public class DelegateTuple<E> extends Object implements ITuple<E>
ITuple wrapping a delegate that may be used to override some of
 the methods on the delegate object.| Constructor and Description | 
|---|
DelegateTuple(ITuple<E> delegate)  | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
flags()
The  
IRangeQuery flags | 
byte[] | 
getKey()
Returns a copy of the current key. 
 | 
ByteArrayBuffer | 
getKeyBuffer()
The buffer into which the keys are being copied. 
 | 
boolean | 
getKeysRequested()
True iff  
IRangeQuery.KEYS was specified. | 
DataInputBuffer | 
getKeyStream()
Return a stream from which the key may be read. 
 | 
E | 
getObject()
De-serializes the object from the key and/or value. 
 | 
int | 
getSourceIndex()
The index of the source from which the tuple was read. 
 | 
ITupleSerializer | 
getTupleSerializer()
Return the object that can be used to de-serialize the tuple. 
 | 
byte[] | 
getValue()
The value in the index under the key. 
 | 
ByteArrayBuffer | 
getValueBuffer()
The buffer into which the values are being copied. 
 | 
boolean | 
getValuesRequested()
True iff  
IRangeQuery.VALS was specified. | 
DataInputBuffer | 
getValueStream()
Return a stream from which the value may be read. 
 | 
long | 
getVersionTimestamp()
Return the timestamp associated with the index entry -or-  
0L
 IFF the index does not support transactional isolation. | 
long | 
getVisitCount()
The #of entries that have been visited so far and ZERO (0) until the
 first entry has been visited. 
 | 
boolean | 
isDeletedVersion()
Return  
true iff the index entry was marked as deleted. | 
boolean | 
isNull()
true iff the value stored under the index entry is
 null. | 
IBlock | 
readBlock(long addr)
Return an object that may be used to perform a streaming read of a large
 record from the  
IRawStore that provided this tuple. | 
String | 
toString()  | 
public int getSourceIndex()
ITupleBTree or
 IndexSegment. When reading on a FusedView this is the
 index of the element of the view which reported the tuple.getSourceIndex in interface ITuple<E>public int flags()
ITupleIRangeQuery flags
 
 
 
 if ((flags & IRangeQuery.KEYS) != 0) {
 
     // keys requested.
 
 }
 
 
 
 Note: the IRangeQuery.DELETED flag state is a property of the
 iterator NOT the tuple. Whether or not a tuple is deleted is detected
 using ITuple.isDeletedVersion().public byte[] getKey()
ITuple
 Note: This can cause a heap allocation depending on how the keys are
 buffered. See ITuple.getKeyBuffer() to avoid that allocation.
public ByteArrayBuffer getKeyBuffer()
ITuplegetKeyBuffer in interface ITuple<E>public boolean getKeysRequested()
ITupleIRangeQuery.KEYS was specified.getKeysRequested in interface ITuple<E>public DataInputBuffer getKeyStream()
ITuplegetKeyStream in interface ITuple<E>public byte[] getValue()
ITuple
 Note: This causes a heap allocation. See ITuple.getValueBuffer() to
 avoid that allocation.
public boolean isNull()
ITupletrue iff the value stored under the index entry is
 null.public ByteArrayBuffer getValueBuffer()
ITuple
 Note: If the index supports delete markers then you MUST test
 ITuple.isDeletedVersion() in order to determine whether or not the
 value buffer contains data for the current index entry.
getValueBuffer in interface ITuple<E>public boolean getValuesRequested()
ITupleIRangeQuery.VALS was specified.getValuesRequested in interface ITuple<E>public DataInputBuffer getValueStream()
ITupleITuple.getValueStream() to ITuple.getValue() as it can avoid some
 heap churn.getValueStream in interface ITuple<E>public long getVersionTimestamp()
ITuple0L
 IFF the index does not support transactional isolation.getVersionTimestamp in interface ITuple<E>public long getVisitCount()
ITuplegetVisitCount in interface ITuple<E>public boolean isDeletedVersion()
ITupletrue iff the index entry was marked as deleted.
 
 Note: If the index does not support deletion markers then this method
 MUST return false.
 
 Note: the IRangeQuery.DELETED flag state is a property of the
 iterator NOT the tuple. Whether or not a tuple is deleted is detected
 using ITuple.isDeletedVersion().
isDeletedVersion in interface ITuple<E>public IBlock readBlock(long addr)
ITupleIRawStore that provided this tuple.public E getObject()
ITuplegetObject in interface ITuple<E>ITupleSerializer.deserialize(ITuple)public ITupleSerializer getTupleSerializer()
ITuplegetTupleSerializer in interface ITuple<E>Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.