public class TryConsumeCommand extends Object implements RemoteCommand<Boolean>, ComparableByContent<TryConsumeCommand>
| Modifier and Type | Field and Description |
|---|---|
static SerializationHandle<TryConsumeCommand> |
SERIALIZATION_HANDLE |
static TryConsumeCommand |
TRY_CONSUME_ONE |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBeMerged(RemoteCommand<?> another) |
static TryConsumeCommand |
create(long tokensToConsume) |
boolean |
equalsByContent(TryConsumeCommand other) |
long |
estimateTokensToConsume() |
CommandResult<Boolean> |
execute(MutableBucketEntry mutableEntry,
long currentTimeNanos) |
long |
getConsumedTokens(Boolean result) |
Version |
getRequiredVersion() |
SerializationHandle |
getSerializationHandle() |
long |
getTokensToConsume() |
boolean |
isImmediateSyncRequired(long unsynchronizedTokens,
long nanosSinceLastSync) |
void |
mergeInto(RemoteCommand<?> mergedCommand) |
RemoteCommand<?> |
toMergedCommand() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasVerbose, deserialize, fromJsonCompatibleSnapshot, getMergedCommandsCount, isInitializationCommand, isMerged, serialize, toJsonCompatibleSnapshot, unwrapOneResultequalspublic static final TryConsumeCommand TRY_CONSUME_ONE
public static final SerializationHandle<TryConsumeCommand> SERIALIZATION_HANDLE
public RemoteCommand<?> toMergedCommand()
toMergedCommand in interface RemoteCommand<Boolean>public boolean canBeMerged(RemoteCommand<?> another)
canBeMerged in interface RemoteCommand<Boolean>public void mergeInto(RemoteCommand<?> mergedCommand)
mergeInto in interface RemoteCommand<Boolean>public static TryConsumeCommand create(long tokensToConsume)
public CommandResult<Boolean> execute(MutableBucketEntry mutableEntry, long currentTimeNanos)
execute in interface RemoteCommand<Boolean>public long getTokensToConsume()
public SerializationHandle getSerializationHandle()
getSerializationHandle in interface RemoteCommand<Boolean>public boolean equalsByContent(TryConsumeCommand other)
equalsByContent in interface ComparableByContent<TryConsumeCommand>public boolean isImmediateSyncRequired(long unsynchronizedTokens,
long nanosSinceLastSync)
isImmediateSyncRequired in interface RemoteCommand<Boolean>public long estimateTokensToConsume()
estimateTokensToConsume in interface RemoteCommand<Boolean>public long getConsumedTokens(Boolean result)
getConsumedTokens in interface RemoteCommand<Boolean>public Version getRequiredVersion()
getRequiredVersion in interface RemoteCommand<Boolean>Copyright © 2024. All rights reserved.