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
FieldsModifier and TypeFieldDescriptionstatic final SerializationHandle<VerboseCommand<?>>static final VerboseCommand<Boolean> -
Method Summary
Modifier and TypeMethodDescriptionbooleancanBeMerged(RemoteCommand<?> another) booleanequalsByContent(VerboseCommand<?> other) longexecute(MutableBucketEntry mutableEntry, long currentTimeNanos) static <T> VerboseCommand<T>from(RemoteCommand<T> targetCommand) longgetConsumedTokens(RemoteVerboseResult<T> result) intbooleanisImmediateSyncRequired(long unsynchronizedTokens, long nanosSinceLastSync) booleanisMerged()voidmergeInto(RemoteCommand<?> mergedCommand) unwrapOneResult(RemoteVerboseResult<T> mergedVerboseResult, int indice) 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, isInitializationCommand
-
Field Details
-
TRY_CONSUME_ONE_VERBOSE
-
SERIALIZATION_HANDLE
-
-
Method Details
-
from
-
getTargetCommand
-
canBeMerged
- Specified by:
canBeMergedin interfaceRemoteCommand<T>
-
toMergedCommand
- Specified by:
toMergedCommandin interfaceRemoteCommand<T>
-
mergeInto
- Specified by:
mergeIntoin interfaceRemoteCommand<T>
-
getMergedCommandsCount
public int getMergedCommandsCount()- Specified by:
getMergedCommandsCountin interfaceRemoteCommand<T>
-
unwrapOneResult
- Specified by:
unwrapOneResultin interfaceRemoteCommand<T>
-
isMerged
public boolean isMerged()- Specified by:
isMergedin interfaceRemoteCommand<T>
-
execute
public CommandResult<RemoteVerboseResult<T>> execute(MutableBucketEntry mutableEntry, long currentTimeNanos) - Specified by:
executein interfaceRemoteCommand<T>
-
getSerializationHandle
- Specified by:
getSerializationHandlein interfaceRemoteCommand<T>
-
equalsByContent
- 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
- Specified by:
getConsumedTokensin interfaceRemoteCommand<T>
-
getRequiredVersion
- Specified by:
getRequiredVersionin interfaceRemoteCommand<T>
-