public FileSystem getFileSystem() throws RepositoryException { try { FileSystem fs = config.newInstance(FileSystem.class); fs.init(); return fs; } catch (FileSystemException e) { throw new RepositoryException( "File system initialization failure.", e); } } };
public FileSystem getFileSystem() throws RepositoryException { try { FileSystem fs = config.newInstance(FileSystem.class); fs.init(); return fs; } catch (FileSystemException e) { throw new RepositoryException( "File system initialization failure.", e); } } };
protected void setUp() throws Exception { fs = getFileSystem(); fs.init(); }
synonymProviderConfigPath.substring(0, lastSeparator)); ((LocalFileSystem) fs).setRoot(root.getCanonicalFile()); fs.init(); fsr = new FileSystemResource(fs, synonymProviderConfigPath.substring(lastSeparator + 1)); } else { ((LocalFileSystem) fs).setPath(path); fs.init(); fsr = new FileSystemResource(fs, synonymProviderConfigPath);
synonymProviderConfigPath.substring(0, lastSeparator)); ((LocalFileSystem) fs).setRoot(root.getCanonicalFile()); fs.init(); fsr = new FileSystemResource(fs, synonymProviderConfigPath.substring(lastSeparator + 1)); } else { ((LocalFileSystem) fs).setPath(path); fs.init(); fsr = new FileSystemResource(fs, synonymProviderConfigPath);
/** * {@inheritDoc} */ public void init(PMContext context) throws Exception { if (initialized) { throw new IllegalStateException("already initialized"); } stateStore = new HashMap<ItemId, byte[]>(initialCapacity, loadFactor); refsStore = new HashMap<NodeId, byte[]>(initialCapacity, loadFactor); wspFS = context.getFileSystem(); // Choose a FileSystem for the BlobStore based on whether data is persistent or not if (persistent) { blobFS = new LocalFileSystem(); ((LocalFileSystem) blobFS).setRoot(new File(context.getHomeDir(), "blobs")); } else { blobFS = new MemoryFileSystem(); } blobFS.init(); blobStore = new FileSystemBLOBStore(blobFS); if (persistent) { // deserialize contents of state and refs stores loadContents(); } initialized = true; }
/** * {@inheritDoc} */ public void init(PMContext context) throws Exception { if (initialized) { throw new IllegalStateException("already initialized"); } stateStore = new HashMap<ItemId, byte[]>(initialCapacity, loadFactor); refsStore = new HashMap<NodeId, byte[]>(initialCapacity, loadFactor); wspFS = context.getFileSystem(); // Choose a FileSystem for the BlobStore based on whether data is persistent or not if (persistent) { blobFS = new LocalFileSystem(); ((LocalFileSystem) blobFS).setRoot(new File(context.getHomeDir(), "blobs")); } else { blobFS = new MemoryFileSystem(); } blobFS.init(); blobStore = new FileSystemBLOBStore(blobFS); if (persistent) { // deserialize contents of state and refs stores loadContents(); } initialized = true; }
/** * {@inheritDoc} */ public void init(PMContext context) throws Exception { if (initialized) { throw new IllegalStateException("already initialized"); } super.init(context); // initialize mem stores bundleStore = new LinkedHashMap<NodeId, byte[]>(initialCapacity, loadFactor); refsStore = new HashMap<NodeId, byte[]>(initialCapacity, loadFactor); // Choose a FileSystem for the BlobStore based on whether data is persistent or not if (useFileBlobStore) { blobFS = new LocalFileSystem(); ((LocalFileSystem) blobFS).setRoot(new File(context.getHomeDir(), "blobs")); blobFS.init(); blobStore = new FileSystemBLOBStore(blobFS); } else { blobStore = new InMemBLOBStore(); } wspFS = context.getFileSystem(); // load namespaces binding = new BundleBinding(errorHandling, blobStore, getNsIndex(), getNameIndex(), context.getDataStore()); binding.setMinBlobSize(minBlobSize); if (persistent) { // deserialize contents of the stores loadContents(); } initialized = true; }
/** * {@inheritDoc} */ public void init(PMContext context) throws Exception { if (initialized) { throw new IllegalStateException("already initialized"); } super.init(context); // initialize mem stores bundleStore = new LinkedHashMap<NodeId, byte[]>(initialCapacity, loadFactor); refsStore = new HashMap<NodeId, byte[]>(initialCapacity, loadFactor); // Choose a FileSystem for the BlobStore based on whether data is persistent or not if (useFileBlobStore) { blobFS = new LocalFileSystem(); ((LocalFileSystem) blobFS).setRoot(new File(context.getHomeDir(), "blobs")); blobFS.init(); blobStore = new FileSystemBLOBStore(blobFS); } else { blobStore = new InMemBLOBStore(); } wspFS = context.getFileSystem(); // load namespaces binding = new BundleBinding(errorHandling, blobStore, getNsIndex(), getNameIndex(), context.getDataStore()); binding.setMinBlobSize(minBlobSize); if (persistent) { // deserialize contents of the stores loadContents(); } initialized = true; }