Module io.github.bucket4j.core
Class RemoteVerboseResult<T>
java.lang.Object
io.github.bucket4j.distributed.remote.RemoteVerboseResult<T>
- All Implemented Interfaces:
ComparableByContent<RemoteVerboseResult<?>>
public class RemoteVerboseResult<T>
extends Object
implements ComparableByContent<RemoteVerboseResult<?>>
Intention of this class is to provide wrapper around results returned by any method of
VerboseBucket and AsyncVerboseBucket.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRemoteVerboseResult(long operationTimeNanos, int resultTypeId, T value, RemoteBucketState state) -
Method Summary
Modifier and TypeMethodDescriptionasLocal()booleanequalsByContent(RemoteVerboseResult<?> other) longgetState()getValue()<R> RemoteVerboseResult<R><R> RemoteVerboseResult<R>withValue(R newValue)
-
Field Details
-
SERIALIZATION_HANDLE
-
-
Constructor Details
-
RemoteVerboseResult
public RemoteVerboseResult(long operationTimeNanos, int resultTypeId, T value, RemoteBucketState state)
-
-
Method Details
-
getValue
- Returns:
- result of operation with bucket
-
getState
- Returns:
- snapshot of internal bucket state which was actual at operation time
-
getOperationTimeNanos
public long getOperationTimeNanos()- Returns:
- time which was used by the bucket at the moment of handling a request
-
asLocal
-
map
-
withValue
-
equalsByContent
- Specified by:
equalsByContentin interfaceComparableByContent<T>
-