@API(value=MAINTAINED) public class ExecuteState extends Object
ExecuteProperties
otherwise.
In general, the state object should be constructed by as part of a "root" ExecuteProperties
rather than
directly by the client.Modifier and Type | Field and Description |
---|---|
static ExecuteState |
NO_LIMITS
An empty execute state with no record scan limit.
|
static ExecuteState |
NO_SCANNED_RECORDS_LIMIT
Deprecated.
in favor of NO_LIMITS when the byte scan limit was added
|
Constructor and Description |
---|
ExecuteState() |
ExecuteState(RecordScanLimiter recordScanLimiter)
Deprecated.
in favor of the constructor that takes multiple limiters
|
ExecuteState(RecordScanLimiter recordScanLimiter,
ByteScanLimiter byteScanLimiter) |
Modifier and Type | Method and Description |
---|---|
ByteScanLimiter |
getByteScanLimiter()
Get a limiter for the maximum number of bytes that can be retrieved from the database.
|
RecordScanLimiter |
getRecordScanLimiter()
Get a limiter for the maximum number of records that can be retrieved from the database.
|
ExecuteState |
reset()
Create a new
ExecuteState that represents the same properties of the execution that this state represented
when it was first created, but with an independent set of mutable objects. |
String |
toString() |
@API(value=DEPRECATED) @Deprecated public static final ExecuteState NO_SCANNED_RECORDS_LIMIT
public static final ExecuteState NO_LIMITS
public ExecuteState(@Nullable RecordScanLimiter recordScanLimiter, @Nullable ByteScanLimiter byteScanLimiter)
@API(value=DEPRECATED) @Deprecated public ExecuteState(@Nullable RecordScanLimiter recordScanLimiter)
RecordScanLimiter
and not a ByteScanLimiter
.recordScanLimiter
- a RecordScanLimiter
to use in this statepublic ExecuteState()
@Nonnull public ExecuteState reset()
ExecuteState
that represents the same properties of the execution that this state represented
when it was first created, but with an independent set of mutable objects. For example, the RecordScanLimiter
of the returned ExecuteState
has a limit equal to the original limit that was used to create this state's
RecordScanLimiter
. It is up to the implementor to ensure that all components of the state are reset in
a meaningful way, since this might vary depending on that piece of state.ExecuteState
@Nullable public RecordScanLimiter getRecordScanLimiter()
BaseCursor
implementation.
All base cursors are always permitted to load at least one key-value entry before it is stopped by the record scan
limit to ensure that cursors with multiple child cursors (such as UnionCursor
)
can always make progress. Thus, a query execution might overrun its scanned records limit by up to the number of
base cursors in the cursor tree.
Particular base cursors may exceed the record scan limit in other ways, which are documented in their Javadocs.null
if no limit is set@Nullable public ByteScanLimiter getByteScanLimiter()
BaseCursor
implementation.
All base cursors are always permitted to load at least one entry before it is stopped by the byte scan
limit to ensure that cursors with multiple child cursors (such as
UnionCursor
) can always make progress.
Thus, a query execution might overrun the byte scan limit by an effectively arbitrary amount.
Particular base cursors may exceed the record scan limit in other ways which are documented in their Javadocs.null
if no limit is set