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