Package com.apple.foundationdb.record
Enum RecordCursor.NoNextReason
- java.lang.Object
-
- java.lang.Enum<RecordCursor.NoNextReason>
-
- com.apple.foundationdb.record.RecordCursor.NoNextReason
-
- All Implemented Interfaces:
Serializable
,Comparable<RecordCursor.NoNextReason>
- Enclosing interface:
- RecordCursor<T>
public static enum RecordCursor.NoNextReason extends Enum<RecordCursor.NoNextReason>
The reason thatRecordCursor.hasNext()
returnedfalse
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BYTE_LIMIT_REACHED
The limit on the number of bytes to scan was reached.RETURN_LIMIT_REACHED
The limit on the number record to return was reached.SCAN_LIMIT_REACHED
The limit on the number of records to scan was reached.SOURCE_EXHAUSTED
The underlying scan, irrespective of any limit, has reached the end.TIME_LIMIT_REACHED
The limit on the amount of time that a scan can take was reached.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isLimitReached()
Does this reason indicate that some limit was reached? This includes both the in-band returned row limit and the out-of-band time and other resource limits.boolean
isOutOfBand()
Does this reason represent an out-of-band (that is, not solely dependent on the records returned) completion? In general, when an out-of-band reason is encountered, the entire cursor tree unwinds and returns to the client to start over fresh with a new cursor.boolean
isSourceExhausted()
Does this reason indicate that there is no more data available? These are the cases in whichRecordCursor.getContinuation()
would returnnull
.static RecordCursor.NoNextReason
valueOf(String name)
Returns the enum constant of this type with the specified name.static RecordCursor.NoNextReason[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SOURCE_EXHAUSTED
public static final RecordCursor.NoNextReason SOURCE_EXHAUSTED
The underlying scan, irrespective of any limit, has reached the end.RecordCursor.getContinuation()
should returnnull
.
-
RETURN_LIMIT_REACHED
public static final RecordCursor.NoNextReason RETURN_LIMIT_REACHED
The limit on the number record to return was reached. This limit may be specified by a an explicitExecuteProperties.setReturnedRowLimit(int)
of by an implicit limit based on a predicate for continuing, as inMapWhileCursor
.RecordCursor.getContinuation()
may return a continuation for after the requested limit.
-
TIME_LIMIT_REACHED
public static final RecordCursor.NoNextReason TIME_LIMIT_REACHED
The limit on the amount of time that a scan can take was reached.RecordCursor.getContinuation()
may return a continuation for resuming the scan. Note that is it possible forTIME_LIMIT_REACHED
to be returned before any actual records if a complex scan takes a lot of work to reach the requested records, such as a query that does filtering.
-
SCAN_LIMIT_REACHED
public static final RecordCursor.NoNextReason SCAN_LIMIT_REACHED
The limit on the number of records to scan was reached.RecordCursor.getContinuation()
may return a continuation for resuming the scan. Note that it is possible forSCAN_LIMIT_REACHED
to be returned before any actual records if a scan retrieves many records that are discarded, such as by a filter or type filter.
-
BYTE_LIMIT_REACHED
public static final RecordCursor.NoNextReason BYTE_LIMIT_REACHED
The limit on the number of bytes to scan was reached.RecordCursor.getContinuation()
may return a continuation for resuming the scan. Note that it is possible forBYTE_LIMIT_REACHED
to be returned before any actual records if a scan retrieves many bytes for records that are discarded, such as by a filter or type filter.
-
-
Method Detail
-
values
public static RecordCursor.NoNextReason[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RecordCursor.NoNextReason c : RecordCursor.NoNextReason.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RecordCursor.NoNextReason valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isOutOfBand
public boolean isOutOfBand()
Does this reason represent an out-of-band (that is, not solely dependent on the records returned) completion? In general, when an out-of-band reason is encountered, the entire cursor tree unwinds and returns to the client to start over fresh with a new cursor.- Returns:
true
if this cursor stopped early
-
isSourceExhausted
public boolean isSourceExhausted()
Does this reason indicate that there is no more data available? These are the cases in whichRecordCursor.getContinuation()
would returnnull
.- Returns:
true
if the source of this cursor is completely exhausted and no completion is possible
-
isLimitReached
public boolean isLimitReached()
Does this reason indicate that some limit was reached? This includes both the in-band returned row limit and the out-of-band time and other resource limits.- Returns:
true
if this cursor stopped due to any kind of limit being reached
-
-