/** * {@inheritDoc} */ public KeyCursor<K> browseKeys( ReadTransaction<K, K> transaction, ParentPos<K, K>[] stack, int depth ) { int pos = 0; KeyCursor<K> cursor = null; if ( nbElems == 0 ) { // The tree is empty, it's the root, we have nothing to return stack[depth] = new ParentPos<K, K>( null, -1 ); return new KeyCursor<K>( transaction, stack, depth ); } else { // Start at the beginning of the page ParentPos<K, K> parentPos = new ParentPos( this, pos ); stack[depth] = parentPos; cursor = new KeyCursor<K>( transaction, stack, depth ); } return cursor; }
/** * {@inheritDoc} */ public KeyCursor<K> browseKeys( ReadTransaction<K, K> transaction, ParentPos<K, K>[] stack, int depth ) { int pos = 0; KeyCursor<K> cursor = null; if ( nbElems == 0 ) { // The tree is empty, it's the root, we have nothing to return stack[depth] = new ParentPos<K, K>( null, -1 ); return new KeyCursor<K>( transaction, stack, depth ); } else { // Start at the beginning of the page ParentPos<K, K> parentPos = new ParentPos( this, pos ); stack[depth] = parentPos; cursor = new KeyCursor<K>( transaction, stack, depth ); } return cursor; }
/** * {@inheritDoc} */ public TupleCursor<K, V> browse( ReadTransaction<K, V> transaction, ParentPos<K, V>[] stack, int depth ) throws IOException { stack[depth++] = new ParentPos<K, V>( this, 0 ); Page<K, V> page = children[0].getValue(); return page.browse( transaction, stack, depth ); }
/** * {@inheritDoc} */ public KeyCursor<K> browseKeys( ReadTransaction<K, K> transaction, ParentPos<K, K>[] stack, int depth ) throws IOException { stack[depth++] = new ParentPos( this, 0 ); Page<K, V> page = children[0].getValue(); return page.browseKeys( transaction, stack, depth ); }
/** * {@inheritDoc} */ public TupleCursor<K, V> browse( ReadTransaction<K, V> transaction, ParentPos<K, V>[] stack, int depth ) { int pos = 0; TupleCursor<K, V> cursor = null; if ( nbElems == 0 ) { // The tree is empty, it's the root, we have nothing to return stack[depth] = new ParentPos<K, V>( null, -1 ); return new TupleCursor<K, V>( transaction, stack, depth ); } else { // Start at the beginning of the page ParentPos<K, V> parentPos = new ParentPos<K, V>( this, pos ); // Create the value cursor parentPos.valueCursor = values[0].getCursor(); stack[depth] = parentPos; cursor = new TupleCursor<K, V>( transaction, stack, depth ); } return cursor; }
/** * {@inheritDoc} */ public TupleCursor<K, V> browse( ReadTransaction<K, V> transaction, ParentPos<K, V>[] stack, int depth ) { int pos = 0; TupleCursor<K, V> cursor = null; if ( nbElems == 0 ) { // The tree is empty, it's the root, we have nothing to return stack[depth] = new ParentPos<K, V>( null, -1 ); return new TupleCursor<K, V>( transaction, stack, depth ); } else { // Start at the beginning of the page ParentPos<K, V> parentPos = new ParentPos<K, V>( this, pos ); // Create the value cursor parentPos.valueCursor = values[0].getCursor(); stack[depth] = parentPos; cursor = new TupleCursor<K, V>( transaction, stack, depth ); } return cursor; }
/** * {@inheritDoc} */ public TupleCursor<K, V> browse( K key, ReadTransaction<K, V> transaction, ParentPos<K, V>[] stack, int depth ) throws IOException { int pos = findPos( key ); if ( pos < 0 ) { pos = -pos; } // We first stack the current page stack[depth++] = new ParentPos<K, V>( this, pos ); Page<K, V> page = children[pos].getValue(); return page.browse( key, transaction, stack, depth ); }