Module io.github.bucket4j.core
Class GetConfigurationCommand
java.lang.Object
io.github.bucket4j.distributed.remote.commands.GetConfigurationCommand
- All Implemented Interfaces:
RemoteCommand<BucketConfiguration>,ComparableByContent<GetConfigurationCommand>
public class GetConfigurationCommand
extends Object
implements RemoteCommand<BucketConfiguration>, ComparableByContent<GetConfigurationCommand>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongexecute(MutableBucketEntry mutableEntry, long currentTimeNanos) longgetConsumedTokens(BucketConfiguration result) booleanisImmediateSyncRequired(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
-
GetConfigurationCommand
public GetConfigurationCommand()
-
-
Method Details
-
execute
public CommandResult<BucketConfiguration> execute(MutableBucketEntry mutableEntry, long currentTimeNanos) - Specified by:
executein interfaceRemoteCommand<BucketConfiguration>
-
getSerializationHandle
- Specified by:
getSerializationHandlein interfaceRemoteCommand<BucketConfiguration>
-
equalsByContent
- Specified by:
equalsByContentin interfaceComparableByContent<GetConfigurationCommand>
-
isImmediateSyncRequired
public boolean isImmediateSyncRequired(long unsynchronizedTokens, long nanosSinceLastSync) - Specified by:
isImmediateSyncRequiredin interfaceRemoteCommand<BucketConfiguration>
-
estimateTokensToConsume
public long estimateTokensToConsume()- Specified by:
estimateTokensToConsumein interfaceRemoteCommand<BucketConfiguration>
-
getConsumedTokens
- Specified by:
getConsumedTokensin interfaceRemoteCommand<BucketConfiguration>
-
getRequiredVersion
- Specified by:
getRequiredVersionin interfaceRemoteCommand<BucketConfiguration>
-