Class RedissonBatchReactive
- All Implemented Interfaces:
RBatchReactive
- Author:
- Nikita Koksharov
-
Constructor Summary
ConstructorDescriptionRedissonBatchReactive
(EvictionScheduler evictionScheduler, ConnectionManager connectionManager, CommandReactiveExecutor commandExecutor, BatchOptions options) -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono
<Void> discard()
Discard batched commands and release allocated buffers used for parameters encoding.reactor.core.publisher.Mono
<BatchResult<?>> execute()
Executes all operations accumulated during Reactive methods invocations Reactivehronously.getAtomicDouble
(String name) Returns atomicDouble instance by name.getAtomicLong
(String name) Returns "atomic long" instance by name.Returns bitSet instance by name.<V> RBlockingDequeReactive
<V> getBlockingDeque
(String name) Returns blocking deque instance by name.<V> RBlockingDequeReactive
<V> getBlockingDeque
(String name, Codec codec) <V> RBlockingQueueReactive
<V> getBlockingQueue
(String name) Returns blocking queue instance by name.<V> RBlockingQueueReactive
<V> getBlockingQueue
(String name, Codec codec) <V> RBucketReactive
<V> Returns object holder by name<V> RBucketReactive
<V> <V> RDequeReactive
<V> Returns deque instance by name.<V> RDequeReactive
<V> Returns interface for Redis Function featuregetFunction
(Codec codec) Returns interface for Redis Function feature using provided codec<V> RGeoReactive
<V> Returns geospatial items holder instance byname
.<V> RGeoReactive
<V> Returns geospatial items holder instance byname
using provided codec for geospatial members.<V> RHyperLogLogReactive
<V> getHyperLogLog
(String name) Returns HyperLogLog object by name<V> RHyperLogLogReactive
<V> getHyperLogLog
(String name, Codec codec) <V> RJsonBucketReactive
<V> getJsonBucket
(String name, JsonCodec 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> RListReactive
<V> Returns list instance by name.<V> RListReactive
<V> <K,
V> RListMultimapReactive <K, V> getListMultimap
(String name) Returns List based MultiMap instance by name.<K,
V> RListMultimapReactive <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> RListMultimapReactive <K, V> getListMultimapCache
(String name) Returns List based Multimap cache instance by name.<K,
V> RListMultimapReactive <K, V> getListMultimapCache
(String name, Codec codec) Returns List based Multimap cache instance by name using provided codec for both map keys and values.<K,
V> RListMultimapCacheReactive <K, V> Returns List based Multimap instance by name.<K,
V> RListMultimapCacheReactive <K, V> getListMultimapCacheNative
(String name, Codec codec) Returns List based Multimap instance by name using provided codec for both map keys and values.<K,
V> RMapReactive <K, V> Returns map instance by name.<K,
V> RMapReactive <K, V> <K,
V> RMapCacheReactive <K, V> getMapCache
(String name) Returns map-based cache instance byname
.<K,
V> RMapCacheReactive <K, V> getMapCache
(String name, Codec codec) Returns map-based cache instance byname
using providedcodec
for both cache keys and values.<K,
V> RMapCacheNativeReactive <K, V> getMapCacheNative
(String name) Returns map instance by name.<K,
V> RMapCacheNativeReactive <K, V> getMapCacheNative
(String name, Codec codec) Returns map instance by name using provided codec for both map keys and values.<V> RQueueReactive
<V> Returns queue instance by name.<V> RQueueReactive
<V> <V> RScoredSortedSetReactive
<V> getScoredSortedSet
(String name) Returns Redis Sorted Set instance by name<V> RScoredSortedSetReactive
<V> getScoredSortedSet
(String name, Codec codec) Returns script operations objectReturns script operations object using provided codec.Returns API for RediSearch moduleReturns API for RediSearch module using defined codec for attribute values.<V> RSetReactive
<V> Returns set instance by name.<V> RSetReactive
<V> <V> RSetCacheReactive
<V> getSetCache
(String name) Returns set-based cache instance byname
.<V> RSetCacheReactive
<V> getSetCache
(String name, Codec codec) Returns set-based cache instance byname
using providedcodec
for values.<K,
V> RSetMultimapReactive <K, V> getSetMultimap
(String name) Returns Set based Multimap instance by name.<K,
V> RSetMultimapReactive <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> RSetMultimapCacheReactive <K, V> getSetMultimapCache
(String name) Returns Set based Multimap cache instance by name.<K,
V> RSetMultimapCacheReactive <K, V> getSetMultimapCache
(String name, Codec codec) Returns Set based Multimap cache instance by name using provided codec for both map keys and values.<K,
V> RSetMultimapCacheReactive <K, V> Returns Set based Multimap instance by name.<K,
V> RSetMultimapCacheReactive <K, V> getSetMultimapCacheNative
(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> RStreamReactive <K, V> Returns stream instance byname
<K,
V> RStreamReactive <K, V> Returns stream instance byname
using providedcodec
for entries.Returns topic instance by name.
-
Constructor Details
-
RedissonBatchReactive
public RedissonBatchReactive(EvictionScheduler evictionScheduler, ConnectionManager connectionManager, CommandReactiveExecutor commandExecutor, BatchOptions options)
-
-
Method Details
-
getStream
Description copied from interface:RBatchReactive
Returns stream instance byname
Requires Redis 5.0.0 and higher.
- Specified by:
getStream
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- of stream- Returns:
- RStream object
-
getStream
Description copied from interface:RBatchReactive
Returns stream instance byname
using providedcodec
for entries.Requires Redis 5.0.0 and higher.
- Specified by:
getStream
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of streamcodec
- - codec for entry- Returns:
- RStream object
-
getBucket
Description copied from interface:RBatchReactive
Returns object holder by name- Specified by:
getBucket
in interfaceRBatchReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Bucket object
-
getBucket
- Specified by:
getBucket
in interfaceRBatchReactive
-
getJsonBucket
Description copied from interface:RBatchReactive
Returns JSON data holder instance by name using provided codec.- Specified by:
getJsonBucket
in interfaceRBatchReactive
- Type Parameters:
V
- type of value- Parameters:
name
- name of objectcodec
- codec for values- Returns:
- JsonBucket object
- See Also:
-
getHyperLogLog
Description copied from interface:RBatchReactive
Returns HyperLogLog object by name- Specified by:
getHyperLogLog
in interfaceRBatchReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- HyperLogLog object
-
getHyperLogLog
- Specified by:
getHyperLogLog
in interfaceRBatchReactive
-
getList
Description copied from interface:RBatchReactive
Returns list instance by name.- Specified by:
getList
in interfaceRBatchReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- List object
-
getList
- Specified by:
getList
in interfaceRBatchReactive
-
getMap
Description copied from interface:RBatchReactive
Returns map instance by name.- Specified by:
getMap
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- Map object
-
getMap
- Specified by:
getMap
in interfaceRBatchReactive
-
getMapCache
Description copied from interface:RBatchReactive
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
RBatchReactive.getMap(String, Codec)
.- Specified by:
getMapCache
in interfaceRBatchReactive
- 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:RBatchReactive
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
RBatchReactive.getMap(String)
.- Specified by:
getMapCache
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- MapCache object
-
getMapCacheNative
Description copied from interface:RBatchReactive
Returns map instance by name. Supports entry eviction with a given TTL.Requires Redis 7.4.0 and higher.
- Specified by:
getMapCacheNative
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- name of object- Returns:
- Map object
-
getMapCacheNative
Description copied from interface:RBatchReactive
Returns map instance by name using provided codec for both map keys and values. Supports entry eviction with a given TTL.Requires Redis 7.4.0 and higher.
- Specified by:
getMapCacheNative
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- name of objectcodec
- codec for keys and values- Returns:
- Map object
-
getListMultimapCacheNative
Description copied from interface:RBatchReactive
Returns List based Multimap instance by name. Supports key-entry eviction with a given TTL value. Stores insertion order and allows duplicates for values mapped to key.Uses Redis native commands for entry expiration and not a scheduled eviction task.
Requires Redis 7.4.0 and higher.
- Specified by:
getListMultimapCacheNative
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- name of object- Returns:
- ListMultimapCache object
-
getListMultimapCacheNative
Description copied from interface:RBatchReactive
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. Stores insertion order and allows duplicates for values mapped to key.Uses Redis native commands for entry expiration and not a scheduled eviction task.
Requires Redis 7.4.0 and higher.
- Specified by:
getListMultimapCacheNative
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- name of objectcodec
- codec for keys and values- Returns:
- ListMultimapCache object
-
getSetMultimapCacheNative
Description copied from interface:RBatchReactive
Returns Set based Multimap instance by name. Supports key-entry eviction with a given TTL value. Doesn't allow duplications for values mapped to key.Uses Redis native commands for entry expiration and not a scheduled eviction task.
Requires Redis 7.4.0 and higher.
- Specified by:
getSetMultimapCacheNative
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- name of object- Returns:
- SetMultimapCache object
-
getSetMultimapCacheNative
Description copied from interface:RBatchReactive
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. Doesn't allow duplications for values mapped to key.Uses Redis native commands for entry expiration and not a scheduled eviction task.
Requires Redis 7.4.0 and higher.
- Specified by:
getSetMultimapCacheNative
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- name of objectcodec
- codec for keys and values- Returns:
- SetMultimapCache object
-
getSet
Description copied from interface:RBatchReactive
Returns set instance by name.- Specified by:
getSet
in interfaceRBatchReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Set object
-
getSet
- Specified by:
getSet
in interfaceRBatchReactive
-
getTopic
Description copied from interface:RBatchReactive
Returns topic instance by name.- Specified by:
getTopic
in interfaceRBatchReactive
- Parameters:
name
- - name of object- Returns:
- Topic object
-
getTopic
- Specified by:
getTopic
in interfaceRBatchReactive
-
getShardedTopic
Description copied from interface:RBatchReactive
Returns Sharded Topic instance by name.Messages are delivered to message listeners connected to the same Topic.
- Specified by:
getShardedTopic
in interfaceRBatchReactive
- Parameters:
name
- - name of object- Returns:
- Topic object
-
getShardedTopic
Description copied from interface:RBatchReactive
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 interfaceRBatchReactive
- Parameters:
name
- - name of objectcodec
- - codec for message- Returns:
- Topic object
-
getQueue
Description copied from interface:RBatchReactive
Returns queue instance by name.- Specified by:
getQueue
in interfaceRBatchReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Queue object
-
getQueue
- Specified by:
getQueue
in interfaceRBatchReactive
-
getBlockingQueue
Description copied from interface:RBatchReactive
Returns blocking queue instance by name.- Specified by:
getBlockingQueue
in interfaceRBatchReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- BlockingQueue object
-
getBlockingQueue
- Specified by:
getBlockingQueue
in interfaceRBatchReactive
-
getDeque
Description copied from interface:RBatchReactive
Returns deque instance by name.- Specified by:
getDeque
in interfaceRBatchReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Deque object
-
getDeque
- Specified by:
getDeque
in interfaceRBatchReactive
-
getAtomicLong
Description copied from interface:RBatchReactive
Returns "atomic long" instance by name.- Specified by:
getAtomicLong
in interfaceRBatchReactive
- Parameters:
name
- - name of object- Returns:
- AtomicLong object
-
getSetCache
Description copied from interface:RBatchReactive
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
RBatchReactive.getSet(String, Codec)
.- Specified by:
getSetCache
in interfaceRBatchReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- SetCache object
-
getSetCache
Description copied from interface:RBatchReactive
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
RBatchReactive.getSet(String, Codec)
.- Specified by:
getSetCache
in interfaceRBatchReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- SetCache object
-
getScoredSortedSet
Description copied from interface:RBatchReactive
Returns Redis Sorted Set instance by name- Specified by:
getScoredSortedSet
in interfaceRBatchReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- ScoredSortedSet object
-
getScoredSortedSet
- Specified by:
getScoredSortedSet
in interfaceRBatchReactive
-
getLexSortedSet
Description copied from interface:RBatchReactive
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 interfaceRBatchReactive
- Parameters:
name
- - name of object- Returns:
- LexSortedSet object
-
getBitSet
Description copied from interface:RBatchReactive
Returns bitSet instance by name.- Specified by:
getBitSet
in interfaceRBatchReactive
- Parameters:
name
- of bitSet- Returns:
- BitSet object
-
getScript
Description copied from interface:RBatchReactive
Returns script operations object- Specified by:
getScript
in interfaceRBatchReactive
- Returns:
- Script object
-
getScript
Description copied from interface:RBatchReactive
Returns script operations object using provided codec.- Specified by:
getScript
in interfaceRBatchReactive
- Parameters:
codec
- - codec for params and result- Returns:
- Script object
-
getFunction
Description copied from interface:RBatchReactive
Returns interface for Redis Function feature- Specified by:
getFunction
in interfaceRBatchReactive
- Returns:
- function object
-
getFunction
Description copied from interface:RBatchReactive
Returns interface for Redis Function feature using provided codec- Specified by:
getFunction
in interfaceRBatchReactive
- Parameters:
codec
- - codec for params and result- Returns:
- function interface
-
getKeys
Description copied from interface:RBatchReactive
Returns keys operations. Each of Redis/Redisson object associated with own key- Specified by:
getKeys
in interfaceRBatchReactive
- Returns:
- Keys object
-
getSearch
Description copied from interface:RBatchReactive
Returns API for RediSearch module- Specified by:
getSearch
in interfaceRBatchReactive
- Returns:
- RSearchReactive object
-
getSearch
Description copied from interface:RBatchReactive
Returns API for RediSearch module using defined codec for attribute values.- Specified by:
getSearch
in interfaceRBatchReactive
- Parameters:
codec
- codec for entry- Returns:
- RSearchReactive object
-
execute
Description copied from interface:RBatchReactive
Executes all operations accumulated during Reactive methods invocations Reactivehronously. In cluster configurations operations grouped by slot ids so may be executed on different servers. Thus command execution order could be changed- Specified by:
execute
in interfaceRBatchReactive
- Returns:
- List with result object for each command
-
discard
Description copied from interface:RBatchReactive
Discard batched commands and release allocated buffers used for parameters encoding.- Specified by:
discard
in interfaceRBatchReactive
- Returns:
- void
-
getGeo
Description copied from interface:RBatchReactive
Returns geospatial items holder instance byname
.- Specified by:
getGeo
in interfaceRBatchReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Geo object
-
getGeo
Description copied from interface:RBatchReactive
Returns geospatial items holder instance byname
using provided codec for geospatial members.- Specified by:
getGeo
in interfaceRBatchReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for value- Returns:
- Geo object
-
getSetMultimap
Description copied from interface:RBatchReactive
Returns Set based Multimap instance by name.- Specified by:
getSetMultimap
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- SetMultimap object
-
getSetMultimap
Description copied from interface:RBatchReactive
Returns Set based Multimap instance by name using provided codec for both map keys and values.- Specified by:
getSetMultimap
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- SetMultimap object
-
getSetMultimapCache
Description copied from interface:RBatchReactive
Returns Set based Multimap cache instance by name. Supports key eviction by specifying a time to live. If eviction is not required then it's better to use regular set multimapRBatchReactive.getSetMultimap(String)
.- Specified by:
getSetMultimapCache
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- RSetMultimapCacheRx object
-
getSetMultimapCache
Description copied from interface:RBatchReactive
Returns Set based Multimap cache instance by name using provided codec for both map keys and values. Supports key eviction by specifying a time to live. If eviction is not required then it's better to use regular set multimapRBatchReactive.getSetMultimap(String, Codec)
.- Specified by:
getSetMultimapCache
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- RSetMultimapCacheRx object
-
getListMultimap
Description copied from interface:RBatchReactive
Returns List based MultiMap instance by name.- Specified by:
getListMultimap
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- ListMultimap object
-
getListMultimap
Description copied from interface:RBatchReactive
Returns List based MultiMap instance by name using provided codec for both map keys and values.- Specified by:
getListMultimap
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- ListMultimap object
-
getListMultimapCache
Description copied from interface:RBatchReactive
Returns List based Multimap cache instance by name. Supports key eviction by specifying a time to live. If eviction is not required then it's better to use regular list multimapRBatchReactive.getListMultimap(String)
.- Specified by:
getListMultimapCache
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- RListMultimapCacheRx object
-
getListMultimapCache
Description copied from interface:RBatchReactive
Returns List based Multimap cache instance by name using provided codec for both map keys and values. Supports key eviction by specifying a time to live. If eviction is not required then it's better to use regular list multimapRBatchReactive.getListMultimap(String, Codec)
.- Specified by:
getListMultimapCache
in interfaceRBatchReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- RListMultimapCacheRx object
-
getAtomicDouble
Description copied from interface:RBatchReactive
Returns atomicDouble instance by name.- Specified by:
getAtomicDouble
in interfaceRBatchReactive
- Parameters:
name
- - name of object- Returns:
- AtomicDouble object
-
getBlockingDeque
Description copied from interface:RBatchReactive
Returns blocking deque instance by name.- Specified by:
getBlockingDeque
in interfaceRBatchReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- BlockingDeque object
-
getBlockingDeque
- Specified by:
getBlockingDeque
in interfaceRBatchReactive
-