@API(value=INTERNAL) public interface ByteScanLimiter
ExecuteState.getByteScanLimiter()
Modifier and Type | Method and Description |
---|---|
long |
getBytesScanned()
Returns the number of bytes that have been scanned thus far.
|
long |
getLimit()
Get the byte scan limit.
|
boolean |
hasBytesRemaining()
Atomically check whether the number of remaining bytes is at least 0.
|
boolean |
isEnforcing()
Return whether or not this limiter is actully enforcing the limit (vs one that simply tracks resource consumption).
|
void |
registerScannedBytes(long bytes)
Atomically decrement the number of remaining bytes by the given number of bytes.
|
ByteScanLimiter |
reset()
Create a new
ByteScanLimiter with this limiter's original limit, ignoring any calls to
hasBytesRemaining() and registerScannedBytes(long) . |
@Nonnull ByteScanLimiter reset()
ByteScanLimiter
with this limiter's original limit, ignoring any calls to
hasBytesRemaining()
and registerScannedBytes(long)
.ByteScanLimiter
with this limiter's original limitboolean isEnforcing()
true
if the limiter is enforcing a limit.boolean hasBytesRemaining()
true
if the remaining count is at least 0 and false
if it is less than 0void registerScannedBytes(long bytes)
bytes
- the number of bytes to registerlong getLimit()
long getBytesScanned()