public interface ITuple<E>
ITupleIterator.| 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. |
int flags()
IRangeQuery 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 isDeletedVersion().boolean getKeysRequested()
IRangeQuery.KEYS was specified.boolean getValuesRequested()
IRangeQuery.VALS was specified.int getSourceIndex()
BTree or
IndexSegment. When reading on a FusedView this is the
index of the element of the view which reported the tuple.IllegalStateException - if nothing has been visited.long getVisitCount()
byte[] getKey()
Note: This can cause a heap allocation depending on how the keys are
buffered. See getKeyBuffer() to avoid that allocation.
UnsupportedOperationException - if keys are not being materialized.ByteArrayBuffer getKeyBuffer()
UnsupportedOperationException - if keys are not being materialized.DataInputBuffer getKeyStream()
UnsupportedOperationException - if the keys were not requested.boolean isNull()
true iff the value stored under the index entry is
null.byte[] getValue()
Note: This causes a heap allocation. See getValueBuffer() to
avoid that allocation.
null if
version metadata is being maintained and the the index entry is
marked as deleted.UnsupportedOperationException - if values are not being materialized.ByteArrayBuffer getValueBuffer()
Note: If the index supports delete markers then you MUST test
isDeletedVersion() in order to determine whether or not the
value buffer contains data for the current index entry.
UnsupportedOperationException - if values are not being materialized.UnsupportedOperationException - if the value is null.UnsupportedOperationException - if the index entry is deleted.DataInputBuffer getValueStream()
getValueStream() to getValue() as it can avoid some
heap churn.UnsupportedOperationException - if the values were not requested.UnsupportedOperationException - if the value is null.UnsupportedOperationException - if the index entry is deleted.E getObject()
UnsupportedOperationException - if IRangeQuery.KEYS and/or IRangeQuery.VALS
are required to de-serialize the object but were not
specified when the ITupleIterator was created.ITupleSerializer.deserialize(ITuple)IBlock readBlock(long addr)
IRawStore that provided this tuple.addr - The address of the record.long getVersionTimestamp()
0L
IFF the index does not support transactional isolation.boolean isDeletedVersion()
true 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 isDeletedVersion().
ITupleSerializer getTupleSerializer()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.