@API(value=MAINTAINED) public class RecordScanLimiter extends Object
ExecuteState.getRecordScanLimiter()
Constructor and Description |
---|
RecordScanLimiter(int limit) |
Modifier and Type | Method and Description |
---|---|
int |
getLimit()
Get the record scan limit.
|
RecordScanLimiter |
reset()
Create a new
RecordScanLimiter with this limiter's original limit, ignoring any calls to tryRecordScan() . |
String |
toString() |
boolean |
tryRecordScan()
Atomically decrement the counter and return false if falls below 0.
|
@Nonnull public RecordScanLimiter reset()
RecordScanLimiter
with this limiter's original limit, ignoring any calls to tryRecordScan()
.public boolean tryRecordScan()
true
if the remaining count is at least 0, and false
if it is less than 0public int getLimit()