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 com.caucho.db.index.BTree

          Block rootBlock = allocateIndexBlock();
          long rootBlockId = rootBlock.getBlockId();
          rootBlock.free();

          BTree btree = new BTree(this, rootBlockId, column.getLength(),
                                  keyCompare);

          column.setIndex(btree);
        }
      }
    View Full Code Here

    Examples of com.caucho.db.index.BTree

        throws IOException
      {
        Column []columns = _row.getColumns();

        for (int i = 0; i < columns.length; i++) {
          BTree index = columns[i].getIndex();

          if (index == null)
            continue;

          long rootAddr = index.getIndexRoot();

          Block block = readBlock(addressToBlockId(rootAddr));

          try {
            byte []blockBuffer = block.getBuffer();
    View Full Code Here

    Examples of com.caucho.db.index.BTree

        Column []columns = _row.getColumns();
        for (int i = 0; i < columns.length; i++) {
          if (! columns[i].isUnique())
            continue;

          BTree index = columns[i].getIndex();

          if (index != null) {
            writeLong(os, index.getIndexRoot());
          }
          else {
            writeLong(os, 0);
          }
        }
    View Full Code Here

    Examples of com.caucho.db.index.BTree

       */
      @Override
      void deleteIndex(DbTransaction xa, byte []block, int rowOffset)
        throws SQLException
      {
        BTree index = getIndex();

        if (index != null)
          index.remove(block, rowOffset + _columnOffset, 4);
      }
    View Full Code Here

    Examples of com.db4o.internal.btree.BTree

            // overridden in YapObjectCarrier to do nothing
            classCollection().initTables(1);
        }
       
        public final BTree createBTreeClassIndex(int id){
            return new BTree(i_trans, id, new IDHandler(this));
        }
    View Full Code Here

    Examples of jdbm.btree.BTree

                    return set.getFirst();
                }

                // Handle values if they are stored in another BTree
                BTree tree = getBTree( values.getBTreeRedirect() );

                jdbm.helper.Tuple tuple = new jdbm.helper.Tuple();
                TupleBrowser<K, V> browser = tree.browse();
                browser.getNext( tuple );

                return ( V ) tuple.getKey();
            }
            catch ( IOException ioe )
    View Full Code Here

    Examples of jdbm.btree.BTree

                        return;
                    }

                    if ( set.size() > numDupLimit )
                    {
                        BTree tree = convertToBTree( set );
                        BTreeRedirect redirect = new BTreeRedirect( tree.getRecordId() );
                        bt.insert( key, ( V ) BTreeRedirectMarshaller.INSTANCE.serialize( redirect ), true );

                        if ( LOG.isDebugEnabled() )
                        {
                            LOG.debug( "<--- Add new BTREE {} = {}", name, key );
                        }
                    }
                    else
                    {
                        bt.insert( key, ( V ) marshaller.serialize( set ), true );

                        if ( LOG.isDebugEnabled() )
                        {
                            LOG.debug( "<--- Add AVL {} = {}", name, key );
                        }
                    }

                    count++;
                    commit( recMan );

                    return;
                }

                BTree tree = getBTree( values.getBTreeRedirect() );
                replaced = ( V ) tree.insert( value, StringConstants.EMPTY_BYTES, true );

                if ( replaced == null )
                {
                    count++;
                }
    View Full Code Here

    Examples of jdbm.btree.BTree

                    return;
                }

                // if the number of duplicates falls below the numDupLimit value
                BTree tree = getBTree( values.getBTreeRedirect() );

                if ( tree.find( value ) != null && tree.remove( value ) != null )
                {
                    /*
                     * If we drop below the duplicate limit then we revert from using
                     * a Jdbm BTree to using an in memory AvlTree.
                     */
                    if ( tree.size() <= numDupLimit )
                    {
                        ArrayTree<V> avlTree = convertToArrayTree( tree );
                        bt.insert( key, ( V ) marshaller.serialize( avlTree ), true );
                        recMan.delete( tree.getRecordId() );
                    }

                    count--;

                    if ( LOG.isDebugEnabled() )
    View Full Code Here

    Examples of jdbm.btree.BTree

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

                if ( BTreeRedirectMarshaller.isRedirect( serialized ) )
                {
                    BTree tree = getBTree( BTreeRedirectMarshaller.INSTANCE.deserialize( serialized ) );
                    this.count -= tree.size();

                    if ( LOG.isDebugEnabled() )
                    {
                        LOG.debug( "<--- Remove BTree {} = {}", name, key );
                    }

                    recMan.delete( tree.getRecordId() );
                    duplicateBtrees.remove( tree.getRecordId() );

                    commit( recMan );

                    return;
                }
    View Full Code Here

    Examples of jdbm.btree.BTree

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

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

            ArrayTree<V> set = marshaller.deserialize( serialized );
    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.