Package org.redisson
Class RedissonBuckets
- java.lang.Object
-
- org.redisson.RedissonBuckets
-
- All Implemented Interfaces:
RBuckets,RBucketsAsync
- Direct Known Subclasses:
RedissonTransactionalBuckets
public class RedissonBuckets extends Object implements RBuckets
- Author:
- Nikita Koksharov
-
-
Field Summary
Fields Modifier and Type Field Description protected Codeccodecprotected CommandAsyncExecutorcommandExecutor
-
Constructor Summary
Constructors Constructor Description RedissonBuckets(Codec codec, CommandAsyncExecutor commandExecutor)RedissonBuckets(CommandAsyncExecutor commandExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V> Map<String,V>get(String... keys)Returns Redis object mapped by key.<V> RFuture<Map<String,V>>getAsync(String... keys)Returns Redis object mapped by key.voidset(Map<String,?> buckets)Saves objects mapped by Redis key.RFuture<Void>setAsync(Map<String,?> buckets)Saves objects mapped by Redis key.booleantrySet(Map<String,?> buckets)Try to save objects mapped by Redis key.RFuture<Boolean>trySetAsync(Map<String,?> buckets)Try to save objects mapped by Redis key.
-
-
-
Field Detail
-
codec
protected final Codec codec
-
commandExecutor
protected final CommandAsyncExecutor commandExecutor
-
-
Constructor Detail
-
RedissonBuckets
public RedissonBuckets(CommandAsyncExecutor commandExecutor)
-
RedissonBuckets
public RedissonBuckets(Codec codec, CommandAsyncExecutor commandExecutor)
-
-
Method Detail
-
get
public <V> Map<String,V> get(String... keys)
Description copied from interface:RBucketsReturns Redis object mapped by key. Result Map is not contains key-value entry for null values.
-
trySet
public boolean trySet(Map<String,?> buckets)
Description copied from interface:RBucketsTry to save objects mapped by Redis key. If at least one of them is already exist then don't set none of them.
-
set
public void set(Map<String,?> buckets)
Description copied from interface:RBucketsSaves objects mapped by Redis key.
-
getAsync
public <V> RFuture<Map<String,V>> getAsync(String... keys)
Description copied from interface:RBucketsAsyncReturns Redis object mapped by key. Result Map is not contains key-value entry for null values.- Specified by:
getAsyncin interfaceRBucketsAsync- Type Parameters:
V- type of value- Parameters:
keys- - keys- Returns:
- Map with name of bucket as key and bucket as value
-
trySetAsync
public RFuture<Boolean> trySetAsync(Map<String,?> buckets)
Description copied from interface:RBucketsAsyncTry 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:
trySetAsyncin interfaceRBucketsAsync- Parameters:
buckets- - map of buckets- Returns:
trueif object has been set otherwisefalse
-
setAsync
public RFuture<Void> setAsync(Map<String,?> buckets)
Description copied from interface:RBucketsAsyncSaves objects mapped by Redis key.- Specified by:
setAsyncin interfaceRBucketsAsync- Parameters:
buckets- - map of buckets- Returns:
- void
-
-