Examples of FixedSizeNodeSizeStrategy


Examples of org.helidb.util.bplus.FixedSizeNodeSizeStrategy

    Database<Integer, String> db = null;
    File f = FileSupport.createTempFile();
    File indf = FileSupport.createTempFile();
    try
    {
      NodeRepository<Integer> nr = new FileBackedNodeRepositoryBuilder<Integer, Long>().setNodeSizeStrategy(new FixedSizeNodeSizeStrategy(4096)).setKeySerializer(IntegerNullSerializer.INSTANCE).setValueSerializer(LongSerializer.INSTANCE).setInternalPointerSize(1).setLogAdapterHolder(lah).create(new ReadWritableFileAdapter(indf), false);

      BPlusTree<Integer, Long> bt = new BPlusTree<Integer, Long>(nr, lah);

      DatabaseBackend<Integer, String, Long> hb = new HeapBackendBuilder<Integer, String>().setKeySerializer(IntegerSerializer.INSTANCE).setLogAdapterHolder(lah).setValueSerializer(StringSerializer.INSTANCE).create(new ReadWritableFileAdapter(f));
View Full Code Here

Examples of org.helidb.util.bplus.FixedSizeNodeSizeStrategy

      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);
      }
      DatabaseBackendFactory<Integer, Long, KeyAndValue<Integer, Long>> baf = new ConstantRecordSizeBPlusTreeBackendFactory<Integer, Long>(nrb, lah);
View Full Code Here

Examples of org.helidb.util.bplus.FixedSizeNodeSizeStrategy

      DatabaseBackend<String, String, Long> b = new HeapBackend<String, String>(new ReadWritableFileAdapter(f), false, StringSerializer.INSTANCE, StringSerializer.INSTANCE, 0, 8192, lah);

      // Maximum pointer needed: approx 1,000,000 * node size
      // approx: 1,000,000 * 20 = 20,000,000 < 4294967296 =
      // 2 ^ (4 * 8). i.e pointer size = 4 bytes
      NodeRepository<BigInteger> nr = new FileBackedNodeRepository<BigInteger, Long>(new ReadWritableFileAdapter(treef), false, 0, new FixedSizeNodeSizeStrategy(m_bTreeNodeSize), true, new FixedSizeBigIntegerNullSerializer(STRING_HASH_SIZE + 1), LongNullSerializer.INSTANCE, 4, 8192, null, lah);
      if (m_bTreeLruNodeCacheSize > 0)
      {
        nr = new LruCacheNodeRepository<BigInteger, Long>(nr, m_bTreeLruNodeCacheSize);
      }
      BPlusTree<BigInteger, Long> btree = new BPlusTree<BigInteger, Long>(nr, lah);
View Full Code Here

Examples of org.helidb.util.bplus.FixedSizeNodeSizeStrategy

      DatabaseBackend<Integer, Long, Long> b = new ConstantRecordSizeHeapBackend<Integer, Long>(new ReadWritableFileAdapter(f), false, IntegerSerializer.INSTANCE, LongSerializer.INSTANCE, 0, 8192, lah);

      // Maximum pointer needed: approx 1,000,000 * node size
      // approx: 1,000,000 * 20 = 20,000,000 < 4294967296 =
      // 2 ^ (4 * 8). i.e pointer size = 4 bytes
      NodeRepository<Integer> nr = new FileBackedNodeRepository<Integer, Long>(new ReadWritableFileAdapter(treef), false, 0, new FixedSizeNodeSizeStrategy(m_bTreeNodeSize), true, IntegerNullSerializer.INSTANCE, LongSerializer.INSTANCE, 4, 8192, null, lah);
      if (m_bTreeLruNodeCacheSize > 0)
      {
        nr = new LruCacheNodeRepository<Integer, Long>(nr, m_bTreeLruNodeCacheSize);
      }
      BPlusTree<Integer, Long> btree = new BPlusTree<Integer, Long>(nr, lah);
View Full Code Here

Examples of org.helidb.util.bplus.FixedSizeNodeSizeStrategy

    m_databases = new ArrayList<SimpleDatabase<Integer, Long, KeyAndValue<Integer, Long>>>(noOfDatabases);
    m_dbFiles = new HashMap<Integer, File>(noOfDatabases);
    for (int i = 0; i < noOfDatabases; i++)
    {
      File f = FileSupport.createTempFile();
      NodeRepository<Integer> nr = new FileBackedNodeRepository<Integer, Long>(new ReadWritableFileAdapter(f), false, 0, new FixedSizeNodeSizeStrategy(m_nodeSize), true, IntegerNullSerializer.INSTANCE, LongSerializer.INSTANCE, 5, 8192, null, lah);
      if (m_lruCacheSize > 0)
      {
        nr = new LruCacheNodeRepository<Integer, Long>(nr, m_lruCacheSize);
      }
      ConstantRecordSizeBPlusTreeBackend<Integer, Long> b = new ConstantRecordSizeBPlusTreeBackend<Integer, Long>(nr, false, lah);
View Full Code Here

Examples of org.helidb.util.bplus.FixedSizeNodeSizeStrategy

      DatabaseBackend<String, String, Long> b = new HeapBackend<String, String>(new ReadWritableFileAdapter(f), false, StringSerializer.INSTANCE, StringSerializer.INSTANCE, 0, 8192, lah);

      // Maximum pointer needed: approx 1,000,000 * node size
      // approx: 1,000,000 * 20 = 20,000,000 < 4294967296 =
      // 2 ^ (4 * 8). i.e pointer size = 4 bytes
      NodeRepository<BigInteger> nr = new FileBackedNodeRepository<BigInteger, Long>(new ReadWritableFileAdapter(treef), false, 0, new FixedSizeNodeSizeStrategy(m_bTreeNodeSize), true, new FixedSizeBigIntegerNullSerializer(STRING_HASH_SIZE + 1), LongSerializer.INSTANCE, 4, 8192, null, lah);
      if (m_bTreeLruNodeCacheSize > 0)
      {
        nr = new LruCacheNodeRepository<BigInteger, Long>(nr, m_bTreeLruNodeCacheSize);
      }
      BPlusTree<BigInteger, Long> btree = new BPlusTree<BigInteger, Long>(nr, lah);
View Full Code Here

Examples of org.helidb.util.bplus.FixedSizeNodeSizeStrategy

      DatabaseBackend<Integer, Long, Long> b = new ConstantRecordSizeHeapBackend<Integer, Long>(new ReadWritableFileAdapter(f), false, IntegerSerializer.INSTANCE, LongSerializer.INSTANCE, 0, 8192, lah);

      // Maximum pointer needed: approx 1,000,000 * node size
      // approx: 1,000,000 * 20 = 20,000,000 < 4294967296 =
      // 2 ^ (4 * 8). i.e pointer size = 4 bytes
      NodeRepository<Integer> nr = new FileBackedNodeRepository<Integer, Long>(new ReadWritableFileAdapter(treef), false, 0, new FixedSizeNodeSizeStrategy(m_bTreeNodeSize), true, IntegerNullSerializer.INSTANCE, LongSerializer.INSTANCE, 4, 8192, null, lah);
      if (m_bTreeLruNodeCacheSize > 0)
      {
        nr = new LruCacheNodeRepository<Integer, Long>(nr, m_bTreeLruNodeCacheSize);
      }
      BPlusTree<Integer, Long> btree = new BPlusTree<Integer, Long>(nr, lah);
View Full Code Here

Examples of org.helidb.util.bplus.FixedSizeNodeSizeStrategy

      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);
      }
      DatabaseBackendFactory<String, String, Long> baf = new HeapBackendFactory<String, String>(StringSerializer.INSTANCE, StringSerializer.INSTANCE, lah);
View Full Code Here

Examples of org.helidb.util.bplus.FixedSizeNodeSizeStrategy

      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);
      }
      DatabaseBackendFactory<Integer, Long, Long> baf = new ConstantRecordSizeHeapBackendFactory<Integer, Long>(IntegerSerializer.INSTANCE, LongSerializer.INSTANCE, 0, 8192, lah);
View Full Code Here

Examples of org.helidb.util.bplus.FixedSizeNodeSizeStrategy

    m_dbFiles = new HashMap<Integer, File[]>(noOfDatabases);
    for (int i = 0; i < noOfDatabases; i++)
    {
      File f = FileSupport.createTempFile();
      File logf = FileSupport.createTempFile();
      NodeRepository<Integer> nr = new FileBackedNodeRepository<Integer, Long>(new ReadWritableFileAdapter(f), false, 0, new FixedSizeNodeSizeStrategy(m_nodeSize), true, IntegerNullSerializer.INSTANCE, LongSerializer.INSTANCE, 5, 8192, null, lah);
      if (m_lruCacheSize > 0)
      {
        nr = new LruCacheNodeRepository<Integer, Long>(nr, m_lruCacheSize);
      }
      ConstantRecordSizeBPlusTreeBackend<Integer, Long> b = new ConstantRecordSizeBPlusTreeBackend<Integer, Long>(nr, false, lah);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.