Package com.caucho.db.block

Examples of com.caucho.db.block.BlockStore


  {
    Database db = new Database();
    db.setPath(path);
    db.init();

    BlockStore store = new BlockStore(db, "test", null);
    store.create();

    Block block = store.allocateIndexBlock();
    long blockId = block.getBlockId();
    block.free();

    return new BTree(store, blockId, keySize, new KeyCompare());
  }
View Full Code Here


  }

  public static BTree createStringTest(Path path, int keySize)
    throws IOException, java.sql.SQLException
  {
    BlockStore store = BlockStore.create(path);

    Block block = store.allocateIndexBlock();
    long blockId = block.getBlockId();
    block.free();

    return new BTree(store, blockId, keySize, new StringKeyCompare());
  }
View Full Code Here

     
      Database database = new Database();
      database.ensureMemoryCapacity(1024 * 1024);
      database.init();

      _store = new BlockStore(database, name, null, storePath);
      _store.setFlushDirtyBlocksOnCommit(false);
      _store.create();
    } catch (Exception e) {
      throw ConfigException.create(e);
    }
View Full Code Here

  {
    Database db = new Database();
    db.setPath(path);
    db.init();

    BlockStore store = new BlockStore(db, "test", null);
    store.create();

    Block block = store.allocateIndexBlock();
    long blockId = block.getBlockId();
    block.free();

    return new BTree(store, blockId, keySize, new KeyCompare());
  }
View Full Code Here

  }

  public static BTree createStringTest(Path path, int keySize)
    throws IOException, java.sql.SQLException
  {
    BlockStore store = BlockStore.create(path);

    Block block = store.allocateIndexBlock();
    long blockId = block.getBlockId();
    block.free();

    return new BTree(store, blockId, keySize, new StringKeyCompare());
  }
View Full Code Here

      if (storePath.exists()) {
  log.warning(L.l("Removal of old temp file '{0}' failed. Please check permissions.",
              storePath.getNativePath()));
      }
   
      _store = new BlockStore(database, name, null, storePath);
      _store.setFlushDirtyBlocksOnCommit(false);
      _store.create();
    } catch (Exception e) {
      throw ConfigException.create(e);
    }
View Full Code Here

TOP

Related Classes of com.caucho.db.block.BlockStore

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.