Module io.github.bucket4j.core
Class ConsumeIgnoringRateLimitsCommand
java.lang.Object
io.github.bucket4j.distributed.remote.commands.ConsumeIgnoringRateLimitsCommand
- All Implemented Interfaces:
RemoteCommand<Long>,ComparableByContent<ConsumeIgnoringRateLimitsCommand>
public class ConsumeIgnoringRateLimitsCommand
extends Object
implements RemoteCommand<Long>, ComparableByContent<ConsumeIgnoringRateLimitsCommand>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SerializationHandle<ConsumeIgnoringRateLimitsCommand> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongexecute(MutableBucketEntry mutableEntry, long currentTimeNanos) longgetConsumedTokens(Long result) longbooleanisImmediateSyncRequired(long unsynchronizedTokens, long nanosSinceLastSync) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.bucket4j.distributed.remote.RemoteCommand
asVerbose, canBeMerged, getMergedCommandsCount, isInitializationCommand, isMerged, mergeInto, toMergedCommand, unwrapOneResult
-
Field Details
-
SERIALIZATION_HANDLE
-
-
Constructor Details
-
ConsumeIgnoringRateLimitsCommand
public ConsumeIgnoringRateLimitsCommand(long limit)
-
-
Method Details
-
getTokensToConsume
public long getTokensToConsume() -
execute
- Specified by:
executein interfaceRemoteCommand<Long>
-
getSerializationHandle
- Specified by:
getSerializationHandlein interfaceRemoteCommand<Long>
-
equalsByContent
- Specified by:
equalsByContentin interfaceComparableByContent<ConsumeIgnoringRateLimitsCommand>
-
isImmediateSyncRequired
public boolean isImmediateSyncRequired(long unsynchronizedTokens, long nanosSinceLastSync) - Specified by:
isImmediateSyncRequiredin interfaceRemoteCommand<Long>
-
estimateTokensToConsume
public long estimateTokensToConsume()- Specified by:
estimateTokensToConsumein interfaceRemoteCommand<Long>
-
getConsumedTokens
- Specified by:
getConsumedTokensin interfaceRemoteCommand<Long>
-
getRequiredVersion
- Specified by:
getRequiredVersionin interfaceRemoteCommand<Long>
-