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() |
int |
getMergedCommandsCount() |
Version |
getRequiredVersion() |
SerializationHandle |
getSerializationHandle() |
boolean |
isImmediateSyncRequired(long unsynchronizedTokens,
long nanosSinceLastSync) |
boolean |
isMerged() |
void |
setLimit(long limit) |
void |
setMerged(boolean merged) |
CommandResult<?> |
unwrapOneResult(Long consumedTokens,
int indice) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasVerbose, canBeMerged, deserialize, fromJsonCompatibleSnapshot, isInitializationCommand, mergeInto, serialize, toJsonCompatibleSnapshot, toMergedCommandequalspublic static final SerializationHandle<ConsumeAsMuchAsPossibleCommand> SERIALIZATION_HANDLE
public CommandResult<Long> execute(MutableBucketEntry mutableEntry, long currentTimeNanos)
execute in interface RemoteCommand<Long>public long getLimit()
public void setLimit(long limit)
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>public boolean isMerged()
isMerged in interface RemoteCommand<Long>public int getMergedCommandsCount()
getMergedCommandsCount in interface RemoteCommand<Long>public CommandResult<?> unwrapOneResult(Long consumedTokens, int indice)
unwrapOneResult in interface RemoteCommand<Long>public void setMerged(boolean merged)
Copyright © 2024. All rights reserved.