Package org.redisson.transaction
Class RedissonTransactionalBuckets
java.lang.Object
org.redisson.RedissonBuckets
org.redisson.transaction.RedissonTransactionalBuckets
- All Implemented Interfaces:
RBuckets
,RBucketsAsync
- Author:
- Nikita Koksharov
-
Field Summary
Fields inherited from class org.redisson.RedissonBuckets
codec, commandExecutor
-
Constructor Summary
ConstructorDescriptionRedissonTransactionalBuckets
(Codec codec, CommandAsyncExecutor commandExecutor, long timeout, List<TransactionalOperation> operations, AtomicBoolean executed, String transactionId) RedissonTransactionalBuckets
(CommandAsyncExecutor commandExecutor, long timeout, List<TransactionalOperation> operations, AtomicBoolean executed, String transactionId) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected <R> RFuture
<R> executeLocked
(Supplier<CompletionStage<R>> runnable, Collection<String> keys) Returns Redis object mapped by key.Saves objects mapped by Redis key.trySetAsync
(Map<String, ?> buckets) Try to save objects mapped by Redis key.Methods inherited from class org.redisson.RedissonBuckets
get, set, trySet
-
Constructor Details
-
RedissonTransactionalBuckets
public RedissonTransactionalBuckets(CommandAsyncExecutor commandExecutor, long timeout, List<TransactionalOperation> operations, AtomicBoolean executed, String transactionId) -
RedissonTransactionalBuckets
public RedissonTransactionalBuckets(Codec codec, CommandAsyncExecutor commandExecutor, long timeout, List<TransactionalOperation> operations, AtomicBoolean executed, String transactionId)
-
-
Method Details
-
getAsync
Description copied from interface:RBucketsAsync
Returns Redis object mapped by key. Result Map is not contains key-value entry for null values.- Specified by:
getAsync
in interfaceRBucketsAsync
- Overrides:
getAsync
in classRedissonBuckets
- Type Parameters:
V
- type of value- Parameters:
keys
- - keys- Returns:
- Map with name of bucket as key and bucket as value
-
setAsync
Description copied from interface:RBucketsAsync
Saves objects mapped by Redis key.- Specified by:
setAsync
in interfaceRBucketsAsync
- Overrides:
setAsync
in classRedissonBuckets
- Parameters:
buckets
- - map of buckets- Returns:
- void
-
trySetAsync
Description copied from interface:RBucketsAsync
Try to save objects mapped by Redis key. If at least one of them is already exist then don't set none of them.- Specified by:
trySetAsync
in interfaceRBucketsAsync
- Overrides:
trySetAsync
in classRedissonBuckets
- Parameters:
buckets
- - map of buckets- Returns:
true
if object has been set otherwisefalse
-
executeLocked
protected <R> RFuture<R> executeLocked(Supplier<CompletionStage<R>> runnable, Collection<String> keys) -
checkState
protected void checkState()
-