|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.btree.view.FusedTupleIterator<ITupleCursor<E>,E>
com.bigdata.btree.view.FusedTupleCursor<E>
public class FusedTupleCursor<E>
Layers on the additional methods from the ITupleCursor interface.
Note: Both the public methods and the internal fields are strongly typed as
ITupleCursors rather than ITupleIterators.
| Field Summary |
|---|
| Fields inherited from class com.bigdata.btree.view.FusedTupleIterator |
|---|
current, DEBUG, deleted, flags, INFO, lastVisited, log, n, sourceIterator, sourceTuple |
| Constructor Summary | |
|---|---|
FusedTupleCursor(int flags,
boolean deleted,
ITupleCursor<E>[] srcs,
IIndex ndx)
|
|
| Method Summary | |
|---|---|
protected ITuple<E> |
consumeLookaheadTuple()
Extended to make a copy of the key for each visited tuple. |
IIndex |
getIndex()
The backing index being traversed by the ITupleCursor. |
boolean |
hasNext()
Return true if there is another tuple that orders after
the current cursor position in the natural order of the index and that
lies within the optional constraints key-range on the cursor or on the
index partition. |
boolean |
hasPrior()
Note: The implementation of hasPrior() closes parallels the
implementation of hasNext() in the base class. |
ITuple<E> |
prior()
Position the cursor on the first visitable tuple ordered less than the current cursor position in the natural key order of the index and return that tuple. |
void |
remove()
Delegates the operation to the source view (correct deletion requires that a delete marker for the tuple is written onto first source index rather than deleting the tuple from the source from which it was materialized). |
ITuple<E> |
seek(byte[] key)
Positions the cursor on the specified key. |
ITuple<E> |
seek(Object key)
Variant that first encodes the key using the object returned by IndexMetadata.getTupleSerializer() for the backing index. |
| Methods inherited from class com.bigdata.btree.view.FusedTupleIterator |
|---|
clearCurrent, next |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.bigdata.btree.ITupleCursor |
|---|
next |
| Constructor Detail |
|---|
public FusedTupleCursor(int flags,
boolean deleted,
ITupleCursor<E>[] srcs,
IIndex ndx)
flags - deleted - srcs - The source iterators.ndx - The FusedView from which the source iterators were
drawn (required). Note that the semantics of remove()
on a fused view require that the tuple is overwritten by a
delete marker in the 1st index of the view.| Method Detail |
|---|
public final IIndex getIndex()
ITupleCursorITupleCursor.
getIndex in interface ITupleCursor<E>public boolean hasNext()
ITupleCursortrue if there is another tuple that orders after
the current cursor position in the natural order of the index and that
lies within the optional constraints key-range on the cursor or on the
index partition.
Note: in order to maintain standard iterator semantics, this method will
return true if the current cursor position is undefined
and #first() would report the existence of a visitable tuple.
hasNext in interface ITupleCursor<E>hasNext in interface Iterator<ITuple<E>>hasNext in class FusedTupleIterator<ITupleCursor<E>,E>public boolean hasPrior()
hasPrior() closes parallels the
implementation of hasNext() in the base class.
hasPrior in interface ITupleCursor<E>public ITuple<E> prior()
ITupleCursor
Note: in order to maintain semantics parallel to standard iterator
semantics, this method will visit the #last() visitable tuple if
the current cursor position is undefined.
prior in interface ITupleCursor<E>public ITuple<E> seek(byte[] key)
ITupleCursorIf there is a corresponding visitable tuple in the index then it is returned.
If there is no visitable tuple in the index for that key then
null is returned. You can use ITupleCursor.prior() or
ITupleCursor.next() to locate the first visitable tuple to either side of the
cursor position.
The cursor position is updated to the specified key regardless of whether there is a visitable tuple in the index for that key.
seek in interface ITupleCursor<E>key - The key (required).
null otherwise.protected ITuple<E> consumeLookaheadTuple()
consumeLookaheadTuple in class FusedTupleIterator<ITupleCursor<E>,E>FusedTupleIterator.current tuple.lastKeyBufferpublic final ITuple<E> seek(Object key)
ITupleCursorIndexMetadata.getTupleSerializer() for the backing index.
seek in interface ITupleCursor<E>key - The key (required).
null otherwise.public void remove()
Note: You must specify IRangeQuery.CURSOR in order for
remove() to be supported.
remove in interface ITupleCursor<E>remove in interface Iterator<ITuple<E>>remove in class FusedTupleIterator<ITupleCursor<E>,E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||