@API(value=INTERNAL) public class RecordCursorStartContinuation extends Object implements RecordCursorContinuation
null
, which is the same as the binary serialization of RecordCursorEndContinuation
. As a result,
the two are distinguishable only through the result of isEnd()
. Because a start continuation is only used
internally and a continuation can be obtained only with a RecordCursorResult
---at which point the cursor is
no longer at its "start"---there is no ambiguity to an external API consumer. However, it remains a potential pitfall.Modifier and Type | Field and Description |
---|---|
static RecordCursorContinuation |
START |
Modifier and Type | Method and Description |
---|---|
boolean |
isEnd()
Return whether this continuation is an "end continuation", i.e., represents that the iteration has reached
its end and would not produce more results even if restarted.
|
byte[] |
toBytes()
Serialize this continuation to a byte array.
|
public static final RecordCursorContinuation START
public boolean isEnd()
RecordCursorContinuation
isEnd()
returns true
, then
RecordCursorContinuation.toBytes()
must return null
.isEnd
in interface RecordCursorContinuation
@Nullable public byte[] toBytes()
RecordCursorContinuation
RecordCursorContinuation.isEnd()
returns true
, then toBytes()
must return
null
.toBytes
in interface RecordCursorContinuation