Tabnine Logo
BPlusTreeFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
BPlusTreeFactory
in
org.apache.jena.dboe.trans.bplustree

Best Java code snippets using org.apache.jena.dboe.trans.bplustree.BPlusTreeFactory (Showing top 20 results out of 315)

origin: apache/jena

/** (Testing mainly) Make an in-memory B+Tree, with copy-in, copy-out block managers */
public static BPlusTree makeMem(String name, int order, int keyLength, int valueLength)
{ return makeMem(name, order, -1, keyLength, valueLength) ; }
origin: apache/jena

@Override
public RangeIndex makeRangeIndex()
{
  BPlusTree bpTree = BPlusTreeFactory.makeMem(order, recordOrder, RecordLib.TestRecordLength, 0) ;
  if ( trackers )
    bpTree = BPlusTreeFactory.addTracking(bpTree) ;
  return bpTree ;
}
origin: apache/jena

/** Create a B+Tree by BlockSize */
public static BPlusTree createBPTreeByBlockSize(ComponentId cid, FileSet fileset,
                        int blockSize,
                        int readCacheSize, int writeCacheSize,
                        RecordFactory factory)
{
  return createBPTree(cid, fileset, -1, blockSize, readCacheSize, writeCacheSize, factory) ; 
}
origin: apache/jena

public static RangeIndex makeBPlusTree(ComponentId cid, FileSet fs, int blkSize, 
                    int readCacheSize, int writeCacheSize,
                    int dftKeyLength, int dftValueLength) {
  RecordFactory recordFactory = makeRecordFactory(dftKeyLength, dftValueLength) ;
  int order = BPlusTreeParams.calcOrder(blkSize, recordFactory.recordLength()) ;
  RangeIndex rIndex = createBPTree(cid, fs, order, blkSize, readCacheSize, writeCacheSize, recordFactory) ;
  return rIndex ;
}
origin: apache/jena

  @Override
  protected BPlusTree makeRangeIndex(int order, int minRecords) {
    BPlusTree bpt = BPlusTreeFactory.makeMem(order, minRecords, RecordLib.TestRecordLength, 0) ;
    if ( addLogger ) {
      // Put it in but disable it so that it can be enabled
      // in the middle of a complex operation.
      LogCtl.disable(BlockMgr.class) ;
      bpt = BPlusTreeFactory.addLogging(bpt) ;
    }
    if ( addTracker )
      bpt = BPlusTreeFactory.addTracking(bpt) ;
    bpt.nonTransactional() ;
    return bpt ;
  }
}
origin: apache/jena

/** Create the java structures to correspond to
 * the supplied block managers for the persistent storage.
 * Initialize the persistent storage to the empty B+Tree if it does not exist.
 */
public static BPlusTree createNonTxn(BPlusTreeParams params, BufferChannel chan, BlockMgr blkMgrNodes, BlockMgr blkMgrLeaves) {
  // Allocate a random ComponentId
  BPlusTree bpt = create(null, params, chan, blkMgrNodes, blkMgrLeaves) ;
  bpt.nonTransactional() ;
  return bpt ;
}
origin: apache/jena

/** Create the java structures to correspond to
 * the supplied block managers for the persistent storage.
 * Initialize the persistent storage to the empty B+Tree if it does not exist.
 * This is primitive operation that underpins creation of a sB+Tree.
 */
public static BPlusTree create(ComponentId id, BPlusTreeParams params, BufferChannel chan, BlockMgr blkMgrNodes, BlockMgr blkMgrLeaves) {
  if ( id == null )
    id = ComponentId.allocLocal() ;
  BPlusTree bpt = attach(id, params, false, chan, blkMgrNodes, blkMgrLeaves) ;
  return bpt ;
}
origin: org.apache.jena/jena-dboe-trans-data

/** Create a B+Tree using defaults */
public static BPlusTree createBPTree(ComponentId cid, FileSet fileset, RecordFactory factory)
{
  int readCacheSize = SystemIndex.BlockReadCacheSize ;
  int writeCacheSize = SystemIndex.BlockWriteCacheSize ;
  int blockSize = SystemIndex.BlockSize ;
  if ( fileset.isMem() )
  {
    readCacheSize = 0 ;
    writeCacheSize = 0 ;
    blockSize = SystemIndex.BlockSizeTest ;
  }
  
  return createBPTreeByBlockSize(cid, fileset, blockSize, readCacheSize, writeCacheSize, factory) ; 
}
origin: apache/jena

  @Override
  protected BPlusTree makeIndex(int order, int minRecords) {
    BPlusTree bpt = BPlusTreeFactory.makeMem(order, minRecords, RecordLib.TestRecordLength, 0) ;
    if ( addLogger ) {
      // Put it in but disable it so that it can be enabled
      // in the middle of a complex operation.
      LogCtl.disable(BlockMgr.class) ;
      bpt = BPlusTreeFactory.addLogging(bpt) ;
    }
    if ( addTracker )
      bpt = BPlusTreeFactory.addTracking(bpt) ;
    bpt.nonTransactional() ;
    return bpt ;
  }
}
origin: org.apache.jena/jena-dboe-trans-data

public static RangeIndex makeBPlusTree(ComponentId cid, FileSet fs, int blkSize, 
                    int readCacheSize, int writeCacheSize,
                    int dftKeyLength, int dftValueLength) {
  RecordFactory recordFactory = makeRecordFactory(dftKeyLength, dftValueLength) ;
  int order = BPlusTreeParams.calcOrder(blkSize, recordFactory.recordLength()) ;
  RangeIndex rIndex = createBPTree(cid, fs, order, blkSize, readCacheSize, writeCacheSize, recordFactory) ;
  return rIndex ;
}
origin: org.apache.jena/jena-dboe-trans-data

/** Create the java structures to correspond to
 * the supplied block managers for the persistent storage.
 * Initialize the persistent storage to the empty B+Tree if it does not exist.
 */
public static BPlusTree createNonTxn(BPlusTreeParams params, BufferChannel chan, BlockMgr blkMgrNodes, BlockMgr blkMgrLeaves) {
  // Allocate a random ComponentId
  BPlusTree bpt = create(null, params, chan, blkMgrNodes, blkMgrLeaves) ;
  bpt.nonTransactional() ;
  return bpt ;
}
origin: org.apache.jena/jena-dboe-trans-data

/** Create the java structures to correspond to
 * the supplied block managers for the persistent storage.
 * Initialize the persistent storage to the empty B+Tree if it does not exist.
 * This is primitive operation that underpins creation of a sB+Tree.
 */
public static BPlusTree create(ComponentId id, BPlusTreeParams params, BufferChannel chan, BlockMgr blkMgrNodes, BlockMgr blkMgrLeaves) {
  if ( id == null )
    id = ComponentId.allocLocal() ;
  BPlusTree bpt = attach(id, params, false, chan, blkMgrNodes, blkMgrLeaves) ;
  return bpt ;
}
origin: apache/jena

/** Create a B+Tree using defaults */
public static BPlusTree createBPTree(ComponentId cid, FileSet fileset, RecordFactory factory)
{
  int readCacheSize = SystemIndex.BlockReadCacheSize ;
  int writeCacheSize = SystemIndex.BlockWriteCacheSize ;
  int blockSize = SystemIndex.BlockSize ;
  if ( fileset.isMem() )
  {
    readCacheSize = 0 ;
    writeCacheSize = 0 ;
    blockSize = SystemIndex.BlockSizeTest ;
  }
  
  return createBPTreeByBlockSize(cid, fileset, blockSize, readCacheSize, writeCacheSize, factory) ; 
}
origin: org.apache.jena/jena-dboe-trans-data

  @Override
  protected BPlusTree makeRangeIndex(int order, int minRecords) {
    BPlusTree bpt = BPlusTreeFactory.makeMem(order, minRecords, RecordLib.TestRecordLength, 0) ;
    if ( addLogger ) {
      // Put it in but disable it so that it can be enabled
      // in the middle of a complex operation.
      LogCtl.disable(BlockMgr.class) ;
      bpt = BPlusTreeFactory.addLogging(bpt) ;
    }
    if ( addTracker )
      bpt = BPlusTreeFactory.addTracking(bpt) ;
    bpt.nonTransactional() ;
    return bpt ;
  }
}
origin: apache/jena

/** (Testing mainly) Make an in-memory B+Tree, with copy-in, copy-out block managers */
public static BPlusTree makeMem(int order, int keyLength, int valueLength)
{ return makeMem(null, order, keyLength, valueLength) ; }
origin: org.apache.jena/jena-dboe-trans-data

@Override
public RangeIndex makeRangeIndex()
{
  BPlusTree bpTree = BPlusTreeFactory.makeMem(order, recordOrder, RecordLib.TestRecordLength, 0) ;
  if ( trackers )
    bpTree = BPlusTreeFactory.addTracking(bpTree) ;
  return bpTree ;
}
origin: apache/jena

/** Create a B+Tree by Order */
public static BPlusTree createBPTreeByOrder(ComponentId cid, FileSet fileset,
                      int order,
                      RecordFactory factory)
{
  return createBPTree(cid, fileset, order, -1, SystemIndex.BlockReadCacheSize, SystemIndex.BlockWriteCacheSize, factory) ; 
}
origin: apache/jena

/** Knowing all the parameters, create a B+Tree */
public static BPlusTree createBPTree(ComponentId cid, FileSet fileset, int order, int blockSize,
                   int readCacheSize, int writeCacheSize,
                   RecordFactory factory)
{
  // ---- Checking
  if (blockSize < 0 && order < 0) throw new IllegalArgumentException("Neither blocksize nor order specified") ;
  if (blockSize >= 0 && order < 0) order = BPlusTreeParams.calcOrder(blockSize, factory.recordLength()) ;
  if (blockSize >= 0 && order >= 0)
  {
    int order2 = BPlusTreeParams.calcOrder(blockSize, factory.recordLength()) ;
    if (order != order2) throw new IllegalArgumentException("Wrong order (" + order + "), calculated = "
                                + order2) ;
  }

  // Iffy - does not allow for slop.
  if (blockSize < 0 && order >= 0) {
    // Only in-memory.
    blockSize = BPlusTreeParams.calcBlockSize(order, factory) ;
  }

  BPlusTreeParams params = new BPlusTreeParams(order, factory) ;
  BufferChannel bptState = FileFactory.createBufferChannel(fileset, Names.extBptState) ;
  BlockMgr blkMgrNodes = BlockMgrFactory.create(fileset, Names.extBptTree, blockSize, readCacheSize, writeCacheSize) ;
  BlockMgr blkMgrRecords = BlockMgrFactory.create(fileset, Names.extBptRecords, blockSize, readCacheSize, writeCacheSize) ;
  return BPlusTreeFactory.create(cid, params, bptState, blkMgrNodes, blkMgrRecords) ;
}
origin: apache/jena

/** Reset an existing B+Tree with different storage units.
 *  For each, null means "use same as original" 
 */
public static BPlusTree rebuild(BPlusTree bpt, BufferChannel chan, BlockMgr blkMgrNodes, BlockMgr blkMgrLeaves) {
  if ( chan == null )
    chan = bpt.getStateManager().getBufferChannel() ;
  if ( blkMgrNodes == null )
    blkMgrNodes = bpt.getNodeManager().getBlockMgr() ;
  if ( blkMgrLeaves == null )
    blkMgrLeaves = bpt.getNodeManager().getBlockMgr() ;
  BPlusTree bpt2 = attach(bpt.getComponentId(), bpt.getParams(), true, chan, blkMgrNodes, blkMgrLeaves) ;
  return bpt2 ;
}
origin: org.apache.jena/jena-dboe-trans-data

  @Override
  protected BPlusTree makeIndex(int order, int minRecords) {
    BPlusTree bpt = BPlusTreeFactory.makeMem(order, minRecords, RecordLib.TestRecordLength, 0) ;
    if ( addLogger ) {
      // Put it in but disable it so that it can be enabled
      // in the middle of a complex operation.
      LogCtl.disable(BlockMgr.class) ;
      bpt = BPlusTreeFactory.addLogging(bpt) ;
    }
    if ( addTracker )
      bpt = BPlusTreeFactory.addTracking(bpt) ;
    bpt.nonTransactional() ;
    return bpt ;
  }
}
org.apache.jena.dboe.trans.bplustreeBPlusTreeFactory

Javadoc

Make BPlusTrees - this code works in close association with the BPlusTree constructor

Most used methods

  • makeMem
    (Testing mainly) Make an in-memory B+Tree, with copy-in, copy-out block managers
  • addTracking
    Debugging
  • createBPTree
    Create a B+Tree using defaults
  • addLogging
    Debugging
  • attach
    Create the in-memory structures to correspond to the supplied block managers for the persistent stor
  • create
    Create the java structures to correspond to the supplied block managers for the persistent storage.
  • createBPTreeByBlockSize
    Create a B+Tree by BlockSize
  • createEmptyBPT
    Allocate root node space. The root is a Node with a Records block.
  • createIfAbsent
    Create if does not exist
  • createNonTxn
    Create the java structures to correspond to the supplied block managers for the persistent storage.
  • makeRecordFactory
  • rebuild
    Reset an existing B+Tree with different storage units. For each, null means "use same as original"
  • makeRecordFactory,
  • rebuild

Popular in Java

  • Reactive rest calls using spring rest template
  • setScale (BigDecimal)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (ScheduledExecutorService)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • JButton (javax.swing)
  • JList (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now