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