Module io.github.bucket4j.core
Class CreateSnapshotCommand
- java.lang.Object
-
- io.github.bucket4j.distributed.remote.commands.CreateSnapshotCommand
-
- All Implemented Interfaces:
RemoteCommand<RemoteBucketState>,ComparableByContent<CreateSnapshotCommand>
public class CreateSnapshotCommand extends Object implements RemoteCommand<RemoteBucketState>, ComparableByContent<CreateSnapshotCommand>
-
-
Field Summary
Fields Modifier and Type Field Description static SerializationHandle<CreateSnapshotCommand>SERIALIZATION_HANDLE
-
Constructor Summary
Constructors Constructor Description CreateSnapshotCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequalsByContent(CreateSnapshotCommand other)longestimateTokensToConsume()CommandResult<RemoteBucketState>execute(MutableBucketEntry mutableEntry, long currentTimeNanos)longgetConsumedTokens(RemoteBucketState result)VersiongetRequiredVersion()SerializationHandlegetSerializationHandle()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<CreateSnapshotCommand> SERIALIZATION_HANDLE
-
-
Method Detail
-
execute
public CommandResult<RemoteBucketState> execute(MutableBucketEntry mutableEntry, long currentTimeNanos)
- Specified by:
executein interfaceRemoteCommand<RemoteBucketState>
-
getSerializationHandle
public SerializationHandle getSerializationHandle()
- Specified by:
getSerializationHandlein interfaceRemoteCommand<RemoteBucketState>
-
equalsByContent
public boolean equalsByContent(CreateSnapshotCommand other)
- Specified by:
equalsByContentin interfaceComparableByContent<CreateSnapshotCommand>
-
isImmediateSyncRequired
public boolean isImmediateSyncRequired(long unsynchronizedTokens, long nanosSinceLastSync)- Specified by:
isImmediateSyncRequiredin interfaceRemoteCommand<RemoteBucketState>
-
estimateTokensToConsume
public long estimateTokensToConsume()
- Specified by:
estimateTokensToConsumein interfaceRemoteCommand<RemoteBucketState>
-
getConsumedTokens
public long getConsumedTokens(RemoteBucketState result)
- Specified by:
getConsumedTokensin interfaceRemoteCommand<RemoteBucketState>
-
getRequiredVersion
public Version getRequiredVersion()
- Specified by:
getRequiredVersionin interfaceRemoteCommand<RemoteBucketState>
-
-