@API(value=INTERNAL) public class ByteScanLimiter extends Object
ExecuteState.getByteScanLimiter()
Constructor and Description |
---|
ByteScanLimiter(long limit) |
Modifier and Type | Method and Description |
---|---|
long |
getLimit()
Get the byte scan limit.
|
boolean |
hasBytesRemaining()
Atomically check whether the number of remaining bytes is at least 0.
|
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) . |
String |
toString() |
@Nonnull public ByteScanLimiter reset()
ByteScanLimiter
with this limiter's original limit, ignoring any calls to
hasBytesRemaining()
and registerScannedBytes(long)
.ByteScanLimiter
with this limiter's original limitpublic boolean hasBytesRemaining()
true
if the remaining count is at least 0 and false
if it is less than 0public void registerScannedBytes(long bytes)
bytes
- the number of bytes to registerpublic long getLimit()