public class ConsumeAsMuchAsPossibleCommand extends Object implements RemoteCommand<Long>, ComparableByContent<ConsumeAsMuchAsPossibleCommand>
| Modifier and Type | Field and Description |
|---|---|
static SerializationHandle<ConsumeAsMuchAsPossibleCommand> |
SERIALIZATION_HANDLE |
| Constructor and Description |
|---|
ConsumeAsMuchAsPossibleCommand(long limit) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equalsByContent(ConsumeAsMuchAsPossibleCommand other) |
long |
estimateTokensToConsume() |
CommandResult<Long> |
execute(MutableBucketEntry mutableEntry,
long currentTimeNanos) |
long |
getConsumedTokens(Long result) |
long |
getLimit() |
Version |
getRequiredVersion() |
SerializationHandle |
getSerializationHandle() |
boolean |
isImmediateSyncRequired(long unsynchronizedTokens,
long nanosSinceLastSync) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasVerbose, deserialize, fromJsonCompatibleSnapshot, isInitializationCommand, serialize, toJsonCompatibleSnapshotequalspublic static final SerializationHandle<ConsumeAsMuchAsPossibleCommand> SERIALIZATION_HANDLE
public CommandResult<Long> execute(MutableBucketEntry mutableEntry, long currentTimeNanos)
execute in interface RemoteCommand<Long>public long getLimit()
public SerializationHandle getSerializationHandle()
getSerializationHandle in interface RemoteCommand<Long>public boolean equalsByContent(ConsumeAsMuchAsPossibleCommand other)
equalsByContent in interface ComparableByContent<ConsumeAsMuchAsPossibleCommand>public boolean isImmediateSyncRequired(long unsynchronizedTokens,
long nanosSinceLastSync)
isImmediateSyncRequired in interface RemoteCommand<Long>public long estimateTokensToConsume()
estimateTokensToConsume in interface RemoteCommand<Long>public long getConsumedTokens(Long result)
getConsumedTokens in interface RemoteCommand<Long>public Version getRequiredVersion()
getRequiredVersion in interface RemoteCommand<Long>Copyright © 2022. All rights reserved.