Package org.entityfs.fs

Examples of org.entityfs.fs.FSRWFileSystemBuilder


    for (int i = 0; i < noOfDatabases; i++)
    {
      File f = FileSupport.createTempFile();
      ReadWritableFile ff = new ReadWritableFileAdapter(f);
      File tmpDir = FileSupport.createTempDirectory();
      Directory tmpDirD = new FSRWFileSystemBuilder().setRoot(tmpDir).create().getRootDirectory();

      DatabaseBackendFactory<Integer, Long, Long> baf = new ConstantRecordSizeHeapBackendFactory<Integer, Long>(IntegerSerializer.INSTANCE, LongSerializer.INSTANCE, 0, 8192, lah);
      ShadowCopyTransactionalDatabase<Integer, Long, Long> db = new ShadowCopyTransactionalDatabase<Integer, Long, Long>(new SingleFileManager(ff, tmpDirD), baf, false, lah);
      m_dbFiles.put(System.identityHashCode(db), new File[] { f, tmpDir });
      m_databases.add(db);
View Full Code Here


    for (int i = 0; i < noOfDatabases; i++)
    {
      File f = FileSupport.createTempFile();
      ReadWritableFile ff = new ReadWritableFileAdapter(f);
      File tmpDir = FileSupport.createTempDirectory();
      Directory tmpDirD = new FSRWFileSystemBuilder().setRoot(tmpDir).create().getRootDirectory();

      DatabaseBackendFactory<String, String, Long> baf = new HeapBackendFactory<String, String>(StringSerializer.INSTANCE, StringSerializer.INSTANCE, lah);
      ShadowCopyTransactionalDatabase<String, String, Long> db = new ShadowCopyTransactionalDatabase<String, String, Long>(new SingleFileManager(ff, tmpDirD), baf, false, lah);
      m_dbFiles.put(System.identityHashCode(db), new File[] { f, tmpDir });
      m_databases.add(db);
View Full Code Here

    for (int i = 0; i < noOfDatabases; i++)
    {
      File f = FileSupport.createTempFile();
      ReadWritableFile ff = new ReadWritableFileAdapter(f);
      File tmpDir = FileSupport.createTempDirectory();
      Directory tmpDirD = new FSRWFileSystemBuilder().setRoot(tmpDir).create().getRootDirectory();

      NodeRepositoryBuilder<Integer> nrb = new FileBackedNodeRepositoryBuilder<Integer, Long>().setKeySerializer(IntegerNullSerializer.INSTANCE).setValueSerializer(LongSerializer.INSTANCE).setNodeSizeStrategy(new FixedSizeNodeSizeStrategy(m_nodeSize));
      if (m_lruCacheSize > 0)
      {
        nrb = new LruCacheNodeRepositoryBuilder<Integer, Long>().setProxiedBuilder(nrb).setMaxCacheSize(m_lruCacheSize);
View Full Code Here

      File f = FileSupport.createTempFile();
      ReadWritableFile ff = new ReadWritableFileAdapter(f);
      File indf = FileSupport.createTempFile();
      ReadWritableFile indff = new ReadWritableFileAdapter(indf);
      File tmpDir = FileSupport.createTempDirectory();
      Directory tmpDirD = new FSRWFileSystemBuilder().setRoot(tmpDir).create().getRootDirectory();

      NodeRepositoryBuilder<BigInteger> nrb = new FileBackedNodeRepositoryBuilder<BigInteger, Long>().setNodeSizeStrategy(new FixedSizeNodeSizeStrategy(m_bTreeNodeSize)).setKeySerializer(new FixedSizeBigIntegerNullSerializer(STRING_HASH_SIZE + 1)).setValueSerializer(LongSerializer.INSTANCE);
      if (m_bTreeLruNodeCacheSize > 0)
      {
        nrb = new LruCacheNodeRepositoryBuilder<BigInteger, Long>().setProxiedBuilder(nrb).setMaxCacheSize(m_bTreeLruNodeCacheSize);
View Full Code Here

      File f = FileSupport.createTempFile();
      ReadWritableFile ff = new ReadWritableFileAdapter(f);
      File indf = FileSupport.createTempFile();
      ReadWritableFile indff = new ReadWritableFileAdapter(indf);
      File tmpDir = FileSupport.createTempDirectory();
      Directory tmpDirD = new FSRWFileSystemBuilder().setRoot(tmpDir).create().getRootDirectory();

      NodeRepositoryBuilder<Integer> nrb = new FileBackedNodeRepositoryBuilder<Integer, Long>().setNodeSizeStrategy(new FixedSizeNodeSizeStrategy(m_bTreeNodeSize)).setKeySerializer(IntegerNullSerializer.INSTANCE).setValueSerializer(LongSerializer.INSTANCE);
      if (m_bTreeLruNodeCacheSize > 0)
      {
        nrb = new LruCacheNodeRepositoryBuilder<Integer, Long>().setProxiedBuilder(nrb).setMaxCacheSize(m_bTreeLruNodeCacheSize);
View Full Code Here

  protected abstract TransactionalDatabase<String, String> createDatabaseWoTxnInDirectory(Directory dir);

  protected TransactionalDatabase<String, String> createDatabaseWoTxn()
  {
    File tmpf = FileSupport.createTempDirectory();
    Directory tmpDir = new FSRWFileSystemBuilder().setRoot(tmpf).create().getRootDirectory();
    TransactionalDatabase<String, String> res = createDatabaseWoTxnInDirectory(tmpDir);
    m_dbDirs.put(Integer.valueOf(System.identityHashCode(res)), tmpDir);
    return res;
  }
View Full Code Here

  protected TransactionalDatabase<Integer, Long> createDatabaseWoTxn()
  {
    File tmpf = FileSupport.createTempDirectory();
    // A locking file system
    Directory tmpDir = new FSRWFileSystemBuilder().setRoot(tmpf).disableAccessControls().create().getRootDirectory();
    // tmpDir.getFileSystem().getLogAdapter().setLevel(Level.ALL);
    TransactionalDatabase<Integer, Long> res = createDatabaseWoTxnInDirectory(tmpDir);
    m_dbDirs.put(System.identityHashCode(res), tmpDir);
    return res;
  }
View Full Code Here

  protected TransactionalDatabase<Character, Character> createCharacterDatabaseWoTxn()
  {
    File tmpf = FileSupport.createTempDirectory();
    // A locking file system
    Directory tmpDir = new FSRWFileSystemBuilder().setRoot(tmpf).disableAccessControls().create().getRootDirectory();
    // tmpDir.getFileSystem().getLogAdapter().setLevel(Level.ALL);
    TransactionalDatabase<Character, Character> res = createCharacterDatabaseWoTxnInDirectory(tmpDir);
    m_dbDirs.put(System.identityHashCode(res), tmpDir);
    return res;
  }
View Full Code Here

TOP

Related Classes of org.entityfs.fs.FSRWFileSystemBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.