Examples of BTree

The first reference was used to implement this class.

TODO: clean up code @author Arjohn Kampman @author Enrico Minack

  • uk.ac.open.kmi.smartproducts.sesame.sail.btree.BTree
    tvincent.edu/swd/btree/btree.html
  • ,
  • http://bluerwhite.org/btree/
  • , and
  • http://semaphorecorp.com/btp/algo.html
  • . The first reference was used to implement this class.

    TODO: clean up code @author Arjohn Kampman @author Enrico Minack

  • xbird.storage.index.BTree
    BTree represents a Variable Magnitude Simple-Prefix B+Tree File.
    @author Makoto YUI (yuin405+xbird@gmail.com)

  • Examples of jdbm.btree.BTree

            byte[] serialized = ( byte[] ) raw;

            if ( BTreeRedirectMarshaller.isRedirect( serialized ) )
            {
                BTree tree = getBTree( BTreeRedirectMarshaller.INSTANCE.deserialize( serialized ) );
                return new KeyBTreeCursor<V>( tree, valueComparator );
            }

            return new ArrayTreeCursor<V>( marshaller.deserialize( serialized ) );
        }
    View Full Code Here

    Examples of org.apache.directory.mavibot.btree.BTree

            Set<String> managedBTrees = recordManager.getManagedTrees();

            assertEquals( 1, managedBTrees.size() );
            assertTrue( managedBTrees.contains( "test" ) );

            BTree btree1 = recordManager.getManagedTree( "test" );

            assertNotNull( btree1 );
            assertEquals( btree.getComparator().getClass().getName(), btree1.getComparator().getClass().getName() );
            assertEquals( btree.getFile(), btree1.getFile() );
            assertEquals( btree.getKeySerializer().getClass().getName(), btree1.getKeySerializer().getClass().getName() );
            assertEquals( btree.getName(), btree1.getName() );
            assertEquals( btree.getNbElems(), btree1.getNbElems() );
            assertEquals( btree.getPageSize(), btree1.getPageSize() );
            assertEquals( btree.getRevision(), btree1.getRevision() );
            assertEquals( btree.getValueSerializer().getClass().getName(), btree1.getValueSerializer().getClass().getName() );
            assertTrue( btree.isAllowDuplicates() );
        }
    View Full Code Here

    Examples of org.apache.jackrabbit.oak.plugins.index.BTree

            Assert.assertFalse(it.hasNext());
        }

        @Test
        public void ascending() {
            BTree tree = new BTree(indexer, "test", true);
            tree.setMinSize(2);
            print(mk, tree);
            int len = 30;
            for (int i = 0; i < len; i++) {
                log("#insert " + i);
                tree.add("" + i, "p" + i);
                // print(mk, tree);
            }
            // indexer.commitChanges();
            for (int i = 0; i < len; i++) {
                // log("#test " + i);
                Cursor c = tree.findFirst("" + i);
                if (c.hasNext()) {
                    Assert.assertEquals("" + i, c.next());
                }
            }
            print(mk, tree);
            for (int i = 0; i < len; i++) {
                Assert.assertTrue("not found when removing " + i, tree.remove("" + i, null));
                // print(mk, tree);
            }
            // indexer.commitChanges();
            print(mk, tree);
            for (int i = 0; i < len; i++) {
                Cursor c = tree.findFirst("" + i);
                Assert.assertFalse(c.hasNext());
            }
        }
    View Full Code Here

    Examples of org.chaidb.db.index.btree.BTree

            if (status == CLOSE) return;
            oldKernelContext.setOnlyMemory(true);
            switch (mode) {
                case STORE_REPLACE:
                    if (storage instanceof BTree) {
                        BTree btree = (BTree) storage;
                        if (btree.isReady()) {
                            //Lookup from BTree to get original object and store.
                            store(key, storage.lookup(key, oldKernelContext), STORE_REPLACE, oldKernelContext);
                        }
                    }
                    return;
    View Full Code Here

    Examples of org.chaidb.db.index.btree.BTree

                case IBTreeConst.HYPER_BTREE:
                    return new HyperBTree();
                case IBTreeConst.PATH_BTREE:
                    return new PathBTree();
                case IBTreeConst.BTREE:
                    return new BTree();
                default:
                    return new BTree();
            }
        }
    View Full Code Here

    Examples of org.exist.storage.btree.BTree

            System.out.println("testRead() ...\n");
           
            DBBroker broker = null;
            try {
                broker = pool.get(pool.getSecurityManager().getSystemSubject());
                BTree btree = ((NativeBroker)broker).getStorage(NativeBroker.COLLECTIONS_DBX_ID);
                Writer writer = new StringWriter();
                btree.dump(writer);
                System.out.println(writer.toString());
               
                Collection test = broker.getCollection(TEST_COLLECTION_URI.append("test2"));
                assertNotNull(test);
                System.out.println("Contents of collection " + test.getURI() + ":");
    View Full Code Here

    Examples of org.neo4j.collections.btree.BTree

                    {
                        Node bTreeNode = graphDb.createNode();
                        bTreeRel = underlyingNode.createRelationshipTo( bTreeNode,
                                BTree.RelTypes.TREE_ROOT );
                    }
                    indexBTree = new BTree( graphDb, bTreeRel.getEndNode() );
                }
                tx.success();
            }
            finally
            {
    View Full Code Here

    Examples of org.openrdf.sail.nativerdf.btree.BTree

          try {
            for (String fieldSeq : addedIndexSpecs) {
              logger.debug("Initializing new index '" + fieldSeq + "'...");

              TripleIndex addedIndex = new TripleIndex(fieldSeq);
              BTree addedBTree = addedIndex.getBTree();

              RecordIterator sourceIter = sourceIndex.getBTree().iterateAll();
              try {
                byte[] value = null;
                while ((value = sourceIter.next()) != null) {
                  addedBTree.insert(value);
                }
              }
              finally {
                sourceIter.close();
              }

              addedBTree.close();
            }

            logger.debug("New index(es) initialized");
          }
          finally {
    View Full Code Here

    Examples of org.openrdf.sail.nativerdf.btree.BTree

      protected double cardinality(int subj, int pred, int obj, int context)
        throws IOException
      {
        TripleIndex index = getBestIndex(subj, pred, obj, context);
        BTree btree = index.btree;

        double rangeSize;

        if (index.getPatternScore(subj, pred, obj, context) == 0) {
          rangeSize = btree.getValueCountEstimate();
        }
        else {
          byte[] minValue = getMinValue(subj, pred, obj, context);
          byte[] maxValue = getMaxValue(subj, pred, obj, context);
          rangeSize = btree.getValueCountEstimate(minValue, maxValue);
        }

        return rangeSize;
      }
    View Full Code Here

    Examples of org.openrdf.sail.nativerdf.btree.BTree

          count = (int)removedTriplesCache.getRecordCount();
          updatedTriplesCache.storeRecords(removedTriplesCache);

          for (TripleIndex index : indexes) {
            BTree btree = index.getBTree();

            RecordIterator recIter = removedTriplesCache.getRecords();
            try {
              while ((data = recIter.next()) != null) {
                btree.insert(data);
              }
            }
            finally {
              recIter.close();
            }
    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.