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
Fields Modifier and Type Field Description static SerializationHandle<ConsumeIgnoringRateLimitsCommand>SERIALIZATION_HANDLE
-
Constructor Summary
Constructors Constructor Description ConsumeIgnoringRateLimitsCommand(long limit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequalsByContent(ConsumeIgnoringRateLimitsCommand other)longestimateTokensToConsume()CommandResult<Long>execute(MutableBucketEntry mutableEntry, long currentTimeNanos)longgetConsumedTokens(Long result)SerializationHandle<RemoteCommand<?>>getSerializationHandle()longgetTokensToConsume()booleanisImmediateSyncRequired(long unsynchronizedTokens, long nanosSinceLastSync)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.github.bucket4j.distributed.remote.RemoteCommand
asVerbose, isInitializationCommand
-
-
-
-
Field Detail
-
SERIALIZATION_HANDLE
public static final SerializationHandle<ConsumeIgnoringRateLimitsCommand> SERIALIZATION_HANDLE
-
-
Method Detail
-
getTokensToConsume
public long getTokensToConsume()
-
execute
public CommandResult<Long> execute(MutableBucketEntry mutableEntry, long currentTimeNanos)
- Specified by:
executein interfaceRemoteCommand<Long>
-
getSerializationHandle
public SerializationHandle<RemoteCommand<?>> getSerializationHandle()
- Specified by:
getSerializationHandlein interfaceRemoteCommand<Long>
-
equalsByContent
public boolean equalsByContent(ConsumeIgnoringRateLimitsCommand other)
- 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
public long getConsumedTokens(Long result)
- Specified by:
getConsumedTokensin interfaceRemoteCommand<Long>
-
-