Package org.redisson.transaction
Class RedissonTransactionalBuckets
- java.lang.Object
-
- org.redisson.RedissonBuckets
-
- org.redisson.transaction.RedissonTransactionalBuckets
-
- All Implemented Interfaces:
RBuckets
,RBucketsAsync
public class RedissonTransactionalBuckets extends RedissonBuckets
- Author:
- Nikita Koksharov
-
-
Field Summary
-
Fields inherited from class org.redisson.RedissonBuckets
codec, commandExecutor
-
-
Constructor Summary
Constructors Constructor Description RedissonTransactionalBuckets(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkState()
protected <R> void
executeLocked(RPromise<R> promise, Runnable runnable, Collection<String> keys)
<V> RFuture<Map<String,V>>
getAsync(String... keys)
Returns Redis object mapped by key.RFuture<Void>
setAsync(Map<String,?> buckets)
Saves objects mapped by Redis key.RFuture<Boolean>
trySetAsync(Map<String,?> buckets)
Try to save objects mapped by Redis key.-
Methods inherited from class org.redisson.RedissonBuckets
get, set, trySet
-
-
-
-
Constructor Detail
-
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 Detail
-
getAsync
public <V> RFuture<Map<String,V>> getAsync(String... keys)
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
public RFuture<Void> setAsync(Map<String,?> buckets)
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
public RFuture<Boolean> trySetAsync(Map<String,?> buckets)
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> void executeLocked(RPromise<R> promise, Runnable runnable, Collection<String> keys)
-
checkState
protected void checkState()
-
-