Class RedissonBatch
- All Implemented Interfaces:
RBatch
- Author:
- Nikita Koksharov
-
Constructor Summary
ConstructorDescriptionRedissonBatch
(EvictionScheduler evictionScheduler, CommandAsyncExecutor executor, BatchOptions options) -
Method Summary
Modifier and TypeMethodDescriptionvoid
discard()
Discard batched commands and release allocated buffers used for parameters encoding.Discard batched commands and release allocated buffers used for parameters encoding.BatchResult
<?> execute()
Executes all operations accumulated during async methods invocations.RFuture
<BatchResult<?>> Executes all operations accumulated during async methods invocations asynchronously.getAtomicDouble
(String name) Returns atomicDouble instance by name.getAtomicLong
(String name) Returns atomicLong instance by name.Returns bitSet instance by name.<V> RBlockingDequeAsync
<V> getBlockingDeque
(String name) Returns blocking deque instance by name.<V> RBlockingDequeAsync
<V> getBlockingDeque
(String name, Codec codec) <V> RBlockingQueueAsync
<V> getBlockingQueue
(String name) Returns blocking queue instance by name.<V> RBlockingQueueAsync
<V> getBlockingQueue
(String name, Codec codec) <V> RBucketAsync
<V> Returns object holder byname
<V> RBucketAsync
<V> <V> RDequeAsync
<V> Returns deque instance by name.<V> RDequeAsync
<V> Returns interface for Redis Function featuregetFunction
(Codec codec) Returns interface for Redis Function feature using provided codec<V> RGeoAsync
<V> Returns geospatial items holder instance byname
.<V> RGeoAsync
<V> Returns geospatial items holder instance byname
using provided codec for geospatial members.<V> RHyperLogLogAsync
<V> getHyperLogLog
(String name) Returns HyperLogLog object<V> RHyperLogLogAsync
<V> getHyperLogLog
(String name, Codec codec) <V> RJsonBucketAsync
<V> getJsonBucket
(String name, JsonCodec<V> codec) Returns JSON data holder instance by name using provided codec.getKeys()
Returns keys operations.getLexSortedSet
(String name) Returns String based Redis Sorted Set instance by name All elements are inserted with the same score during addition, in order to force lexicographical ordering<V> RListAsync
<V> Returns list instance by name.<V> RListAsync
<V> <K,
V> RMultimapAsync <K, V> getListMultimap
(String name) Returns List based MultiMap instance by name.<K,
V> RMultimapAsync <K, V> getListMultimap
(String name, Codec codec) Returns List based MultiMap instance by name using provided codec for both map keys and values.<K,
V> RMultimapCacheAsync <K, V> getListMultimapCache
(String name) Returns List based Multimap instance by name.<K,
V> RMultimapCacheAsync <K, V> getListMultimapCache
(String name, Codec codec) Returns List based Multimap instance by name using provided codec for both map keys and values.<K,
V> RMapAsync <K, V> Returns map instance by name.<K,
V> RMapAsync <K, V> <K,
V> RMapCacheAsync <K, V> getMapCache
(String name) Returns map-based cache instance byname
.<K,
V> RMapCacheAsync <K, V> getMapCache
(String name, Codec codec) Returns map-based cache instance byname
using providedcodec
for both cache keys and values.<V> RQueueAsync
<V> Returns queue instance by name.<V> RQueueAsync
<V> <V> RScoredSortedSetAsync
<V> getScoredSortedSet
(String name) Returns Redis Sorted Set instance by name<V> RScoredSortedSetAsync
<V> getScoredSortedSet
(String name, Codec codec) Returns script operations objectReturns script operations object using provided codec.<V> RSetAsync
<V> Returns set instance by name.<V> RSetAsync
<V> <V> RSetCacheAsync
<V> getSetCache
(String name) Returns set-based cache instance byname
.<V> RSetCacheAsync
<V> getSetCache
(String name, Codec codec) Returns set-based cache instance byname
using providedcodec
for values.<K,
V> RMultimapAsync <K, V> getSetMultimap
(String name) Returns Set based MultiMap instance by name.<K,
V> RMultimapAsync <K, V> getSetMultimap
(String name, Codec codec) Returns Set based MultiMap instance by name using provided codec for both map keys and values.<K,
V> RMultimapCacheAsync <K, V> getSetMultimapCache
(String name) Returns Set based Multimap instance by name.<K,
V> RMultimapCacheAsync <K, V> getSetMultimapCache
(String name, Codec codec) Returns Set based Multimap instance by name using provided codec for both map keys and values.getShardedTopic
(String name) Returns Sharded Topic instance by name.getShardedTopic
(String name, Codec codec) Returns Sharded Topic instance by name using provided codec for messages.<K,
V> RStreamAsync <K, V> Returns stream instance byname
<K,
V> RStreamAsync <K, V> Returns stream instance byname
using providedcodec
for entries.Returns topic instance by name.
-
Constructor Details
-
RedissonBatch
public RedissonBatch(EvictionScheduler evictionScheduler, CommandAsyncExecutor executor, BatchOptions options)
-
-
Method Details
-
getBucket
Description copied from interface:RBatch
Returns object holder byname
-
getBucket
-
getJsonBucket
Description copied from interface:RBatch
Returns JSON data holder instance by name using provided codec.- Specified by:
getJsonBucket
in interfaceRBatch
- Type Parameters:
V
- type of value- Parameters:
name
- name of objectcodec
- codec for values- Returns:
- JsonBucket object
- See Also:
-
getHyperLogLog
Description copied from interface:RBatch
Returns HyperLogLog object- Specified by:
getHyperLogLog
in interfaceRBatch
- Type Parameters:
V
- type of object- Parameters:
name
- - name of object- Returns:
- HyperLogLog object
-
getHyperLogLog
- Specified by:
getHyperLogLog
in interfaceRBatch
-
getList
Description copied from interface:RBatch
Returns list instance by name. -
getList
-
getMap
Description copied from interface:RBatch
Returns map instance by name. -
getMap
-
getSet
Description copied from interface:RBatch
Returns set instance by name. -
getSet
-
getTopic
Description copied from interface:RBatch
Returns topic instance by name. -
getTopic
-
getShardedTopic
Description copied from interface:RBatch
Returns Sharded Topic instance by name.Messages are delivered to message listeners connected to the same Topic.
- Specified by:
getShardedTopic
in interfaceRBatch
- Parameters:
name
- - name of object- Returns:
- Topic object
-
getShardedTopic
Description copied from interface:RBatch
Returns Sharded Topic instance by name using provided codec for messages.Messages are delivered to message listeners connected to the same Topic.
- Specified by:
getShardedTopic
in interfaceRBatch
- Parameters:
name
- - name of objectcodec
- - codec for message- Returns:
- Topic object
-
getQueue
Description copied from interface:RBatch
Returns queue instance by name. -
getQueue
-
getBlockingQueue
Description copied from interface:RBatch
Returns blocking queue instance by name.- Specified by:
getBlockingQueue
in interfaceRBatch
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- BlockingQueue object
-
getBlockingQueue
- Specified by:
getBlockingQueue
in interfaceRBatch
-
getBlockingDeque
Description copied from interface:RBatch
Returns blocking deque instance by name.- Specified by:
getBlockingDeque
in interfaceRBatch
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- BlockingDeque object
-
getBlockingDeque
- Specified by:
getBlockingDeque
in interfaceRBatch
-
getDeque
Description copied from interface:RBatch
Returns deque instance by name. -
getDeque
-
getAtomicLong
Description copied from interface:RBatch
Returns atomicLong instance by name.- Specified by:
getAtomicLong
in interfaceRBatch
- Parameters:
name
- - name of object- Returns:
- AtomicLong object
-
getAtomicDouble
Description copied from interface:RBatch
Returns atomicDouble instance by name.- Specified by:
getAtomicDouble
in interfaceRBatch
- Parameters:
name
- - name of object- Returns:
- AtomicDouble object
-
getScoredSortedSet
Description copied from interface:RBatch
Returns Redis Sorted Set instance by name- Specified by:
getScoredSortedSet
in interfaceRBatch
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- ScoredSortedSet object
-
getScoredSortedSet
- Specified by:
getScoredSortedSet
in interfaceRBatch
-
getLexSortedSet
Description copied from interface:RBatch
Returns String based Redis Sorted Set instance by name All elements are inserted with the same score during addition, in order to force lexicographical ordering- Specified by:
getLexSortedSet
in interfaceRBatch
- Parameters:
name
- - name of object- Returns:
- LexSortedSet object
-
getBitSet
Description copied from interface:RBatch
Returns bitSet instance by name. -
getMapCache
Description copied from interface:RBatch
Returns map-based cache instance byname
using providedcodec
for both cache keys and values. Supports entry eviction with a given TTL value.If eviction is not required then it's better to use regular map
RBatch.getMap(String, Codec)
.- Specified by:
getMapCache
in interfaceRBatch
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- MapCache object
-
getMapCache
Description copied from interface:RBatch
Returns map-based cache instance byname
. Supports entry eviction with a given TTL value.If eviction is not required then it's better to use regular map
RBatch.getMap(String)
.- Specified by:
getMapCache
in interfaceRBatch
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- MapCache object
-
getScript
Description copied from interface:RBatch
Returns script operations object -
getScript
Description copied from interface:RBatch
Returns script operations object using provided codec. -
getFunction
Description copied from interface:RBatch
Returns interface for Redis Function feature- Specified by:
getFunction
in interfaceRBatch
- Returns:
- function object
-
getFunction
Description copied from interface:RBatch
Returns interface for Redis Function feature using provided codec- Specified by:
getFunction
in interfaceRBatch
- Parameters:
codec
- - codec for params and result- Returns:
- function interface
-
getKeys
Description copied from interface:RBatch
Returns keys operations. Each of Redis/Redisson object associated with own key -
getSetCache
Description copied from interface:RBatch
Returns set-based cache instance byname
. Uses map (value_hash, value) under the hood for minimal memory consumption. Supports value eviction with a given TTL value.If eviction is not required then it's better to use regular map
RBatch.getSet(String, Codec)
.- Specified by:
getSetCache
in interfaceRBatch
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- SetCache object
-
getSetCache
Description copied from interface:RBatch
Returns set-based cache instance byname
using providedcodec
for values. Uses map (value_hash, value) under the hood for minimal memory consumption. Supports value eviction with a given TTL value.If eviction is not required then it's better to use regular map
RBatch.getSet(String, Codec)
.- Specified by:
getSetCache
in interfaceRBatch
- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- SetCache object
-
execute
Description copied from interface:RBatch
Executes all operations accumulated during async methods invocations.If cluster configuration used then operations are grouped by slot ids and may be executed on different servers. Thus command execution order could be changed
-
executeAsync
Description copied from interface:RBatch
Executes all operations accumulated during async methods invocations asynchronously.In cluster configurations operations grouped by slot ids so may be executed on different servers. Thus command execution order could be changed
- Specified by:
executeAsync
in interfaceRBatch
- Returns:
- List with result object for each command
-
discard
public void discard()Description copied from interface:RBatch
Discard batched commands and release allocated buffers used for parameters encoding. -
discardAsync
Description copied from interface:RBatch
Discard batched commands and release allocated buffers used for parameters encoding.- Specified by:
discardAsync
in interfaceRBatch
- Returns:
- void
-
getSetMultimap
Description copied from interface:RBatch
Returns Set based MultiMap instance by name.- Specified by:
getSetMultimap
in interfaceRBatch
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- Multimap object
-
getSetMultimap
Description copied from interface:RBatch
Returns Set based MultiMap instance by name using provided codec for both map keys and values.- Specified by:
getSetMultimap
in interfaceRBatch
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - provided codec- Returns:
- Multimap object
-
getListMultimap
Description copied from interface:RBatch
Returns List based MultiMap instance by name.- Specified by:
getListMultimap
in interfaceRBatch
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- ListMultimap object
-
getListMultimap
Description copied from interface:RBatch
Returns List based MultiMap instance by name using provided codec for both map keys and values.- Specified by:
getListMultimap
in interfaceRBatch
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- ListMultimap object
-
getGeo
Description copied from interface:RBatch
Returns geospatial items holder instance byname
. -
getGeo
Description copied from interface:RBatch
Returns geospatial items holder instance byname
using provided codec for geospatial members. -
getSetMultimapCache
Description copied from interface:RBatch
Returns Set based Multimap instance by name. Supports key-entry eviction with a given TTL value.If eviction is not required then it's better to use regular map
RBatch.getSetMultimap(String)
.- Specified by:
getSetMultimapCache
in interfaceRBatch
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- SetMultimapCache object
-
getSetMultimapCache
Description copied from interface:RBatch
Returns Set based Multimap instance by name using provided codec for both map keys and values. Supports key-entry eviction with a given TTL value.If eviction is not required then it's better to use regular map
RBatch.getSetMultimap(String, Codec)
.- Specified by:
getSetMultimapCache
in interfaceRBatch
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - provided codec- Returns:
- SetMultimapCache object
-
getListMultimapCache
Description copied from interface:RBatch
Returns List based Multimap instance by name. Supports key-entry eviction with a given TTL value.If eviction is not required then it's better to use regular map
RBatch.getSetMultimap(String)
.- Specified by:
getListMultimapCache
in interfaceRBatch
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- ListMultimapCache object
-
getListMultimapCache
Description copied from interface:RBatch
Returns List based Multimap instance by name using provided codec for both map keys and values. Supports key-entry eviction with a given TTL value.If eviction is not required then it's better to use regular map
RBatch.getSetMultimap(String, Codec)
.- Specified by:
getListMultimapCache
in interfaceRBatch
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- ListMultimapCache object
-
getStream
Description copied from interface:RBatch
Returns stream instance byname
-
getStream
Description copied from interface:RBatch
Returns stream instance byname
using providedcodec
for entries.
-