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 Codec
codec
protected CommandAsyncExecutor
commandExecutor
-
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.void
set(Map<String,?> buckets)
Saves objects mapped by Redis key.RFuture<Void>
setAsync(Map<String,?> buckets)
Saves objects mapped by Redis key.boolean
trySet(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:RBuckets
Returns 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:RBuckets
Try 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:RBuckets
Saves objects mapped by Redis key.
-
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
- 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: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
- Parameters:
buckets
- - map of buckets- Returns:
true
if object has been set otherwisefalse
-
setAsync
public RFuture<Void> setAsync(Map<String,?> buckets)
Description copied from interface:RBucketsAsync
Saves objects mapped by Redis key.- Specified by:
setAsync
in interfaceRBucketsAsync
- Parameters:
buckets
- - map of buckets- Returns:
- void
-
-