protected final void init() {
        checkState(!initialized, "initialized already");
        Throwable cause = null;
        try {
            final File[] childFiles = rootDir.listFiles();
            if (childFiles != null) {
                for (File f : childFiles) {
                    loadChild(f);
                }
            }
            initialized = true;
        } catch (Throwable t) {
            cause = t;
        }

        if (cause != null) {
            final CentralDogmaException finalCause;
            if (cause instanceof CentralDogmaException) {
                finalCause = (CentralDogmaException) cause;
            } else {
                finalCause = new CentralDogmaException("Failed to load a child: " + cause, cause);
            }
            close(() -> finalCause);
            throw finalCause;
        }
    }
protected final void init ( ) { checkState ( ! initialized , "initialized already" ) ; Throwable cause = null ; try { final File [ ] childFiles = rootDir . listFiles ( ) ; if ( childFiles != null ) { for ( File f : childFiles ) { loadChild ( f ) ; } } initialized = true ; } catch ( Throwable t ) { cause = t ; } if ( cause != null ) { final CentralDogmaException finalCause ; if ( cause instanceof CentralDogmaException ) { finalCause = ( CentralDogmaException ) cause ; } else { finalCause = new CentralDogmaException ( "Failed to load a child: " + cause , cause ) ; } close ( ( ) -> finalCause ) ; throw finalCause ; } }
Initializes this {@link StorageManager} by loading all children.