com.bigdata.btree
Class AbstractBTreeTupleCursor.MutableBTreeTupleCursor<E>

java.lang.Object
  extended by com.bigdata.btree.AbstractBTreeTupleCursor<BTree,Leaf,E>
      extended by com.bigdata.btree.AbstractBTreeTupleCursor.ReadOnlyBTreeTupleCursor<E>
          extended by com.bigdata.btree.AbstractBTreeTupleCursor.MutableBTreeTupleCursor<E>
Type Parameters:
E -
All Implemented Interfaces:
ITupleCursor<E>, ITupleCursor2<E>, ITupleIterator<E>, Iterator<ITuple<E>>
Enclosing class:
AbstractBTreeTupleCursor<I extends AbstractBTree,L extends Leaf,E>

public static class AbstractBTreeTupleCursor.MutableBTreeTupleCursor<E>
extends AbstractBTreeTupleCursor.ReadOnlyBTreeTupleCursor<E>

An ITuple that directly supports forward and reverse cursor operations on a local mutable BTree.

This implementation supports concurrent modification of the BTree but is NOT thread-safe. This means that you can interleave cursor-based tuple operations with insert, update, or delete of tuples using the BTree. However, the BTree itself is NOT thread-safe for mutation and this class does not relax that limitation.

Version:
$Id: AbstractBTreeTupleCursor.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Nested Class Summary
 
Nested classes/interfaces inherited from class com.bigdata.btree.AbstractBTreeTupleCursor
AbstractBTreeTupleCursor.MutableBTreeTupleCursor<E>, AbstractBTreeTupleCursor.ReadOnlyBTreeTupleCursor<E>
 
Field Summary
 
Fields inherited from class com.bigdata.btree.AbstractBTreeTupleCursor
btree, currentPosition, DEBUG, fromKey, INFO, log, toKey, tuple, visitDeleted
 
Constructor Summary
AbstractBTreeTupleCursor.MutableBTreeTupleCursor(BTree btree, Tuple<E> tuple, byte[] fromKey, byte[] toKey)
           
 
Method Summary
protected  com.bigdata.btree.AbstractBTreeTupleCursor.MutableCursorPosition<E> newPosition(ILeafCursor<Leaf> leafCursor, int index, byte[] key)
          Return a new ICursorPosition from the leafCursor, tuple index, and key
protected  com.bigdata.btree.AbstractBTreeTupleCursor.ReadOnlyCursorPosition<E> newTemporaryPosition(com.bigdata.btree.AbstractBTreeTupleCursor.ICursorPosition<Leaf,E> p)
          Note: This is only used by AbstractBTreeTupleCursor.hasNext() and AbstractBTreeTupleCursor.hasPrior() for a temporary test without side-effects on the state of the ITupleCursor and therefore we do NOTNOT register an Leaf.ILeafListener since that is just more overhead and it will not be used.
 
Methods inherited from class com.bigdata.btree.AbstractBTreeTupleCursor
assertCursorPositionDefined, currentKey, first, firstPosition, getExclusiveUpperBound, getFromKey, getInclusiveLowerBound, getIndex, getToKey, hasNext, hasPrior, isCursorPositionDefined, isDeletedTupleVisitor, last, lastPosition, newPosition, next, nextTuple, prior, priorTuple, rangeCheck, remove, seek, seek, toString, tuple
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractBTreeTupleCursor.MutableBTreeTupleCursor

public AbstractBTreeTupleCursor.MutableBTreeTupleCursor(BTree btree,
                                                        Tuple<E> tuple,
                                                        byte[] fromKey,
                                                        byte[] toKey)
Method Detail

newPosition

protected com.bigdata.btree.AbstractBTreeTupleCursor.MutableCursorPosition<E> newPosition(ILeafCursor<Leaf> leafCursor,
                                                                                          int index,
                                                                                          byte[] key)
Description copied from class: AbstractBTreeTupleCursor
Return a new ICursorPosition from the leafCursor, tuple index, and key

Overrides:
newPosition in class AbstractBTreeTupleCursor.ReadOnlyBTreeTupleCursor<E>
Parameters:
leafCursor - The ILeafCursor (already positioned on the desired leaf).
index - The index of the tuple corresponding to the key within the current leaf of the leafCursor -or- a negative integer representing the insertion point for the key if the key is spanned by that leaf but there is no tuple for that key in the leaf.
key - The key.
Returns:
The new ICursorPosition.

newTemporaryPosition

protected com.bigdata.btree.AbstractBTreeTupleCursor.ReadOnlyCursorPosition<E> newTemporaryPosition(com.bigdata.btree.AbstractBTreeTupleCursor.ICursorPosition<Leaf,E> p)
Note: This is only used by AbstractBTreeTupleCursor.hasNext() and AbstractBTreeTupleCursor.hasPrior() for a temporary test without side-effects on the state of the ITupleCursor and therefore we do NOTNOT register an Leaf.ILeafListener since that is just more overhead and it will not be used.

Overrides:
newTemporaryPosition in class AbstractBTreeTupleCursor.ReadOnlyBTreeTupleCursor<E>
Parameters:
p - The cursor position.
Returns:
A clone of that cursor position.


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.