Package org.redisson.reactive
Class RedissonBatchReactive
- java.lang.Object
-
- org.redisson.reactive.RedissonBatchReactive
-
- All Implemented Interfaces:
RBatchReactive
public class RedissonBatchReactive extends Object implements RBatchReactive
- Author:
- Nikita Koksharov
-
-
Constructor Summary
Constructors Constructor Description RedissonBatchReactive(EvictionScheduler evictionScheduler, ConnectionManager connectionManager, CommandReactiveExecutor commandExecutor, BatchOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.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.RAtomicDoubleReactivegetAtomicDouble(String name)Returns atomicDouble instance by name.RAtomicLongReactivegetAtomicLong(String name)Returns "atomic long" instance by name.RBitSetReactivegetBitSet(String 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>getBucket(String name)Returns object holder by name<V> RBucketReactive<V>getBucket(String name, Codec codec)<V> RDequeReactive<V>getDeque(String name)Returns deque instance by name.<V> RDequeReactive<V>getDeque(String name, Codec codec)<V> RGeoReactive<V>getGeo(String name)Returns geospatial items holder instance byname.<V> RGeoReactive<V>getGeo(String name, Codec codec)Returns geospatial items holder instance bynameusing provided codec for geospatial members.<V> RHyperLogLogReactive<V>getHyperLogLog(String name)Returns HyperLogLog object by name<V> RHyperLogLogReactive<V>getHyperLogLog(String name, Codec codec)RKeysReactivegetKeys()Returns keys operations.RLexSortedSetReactivegetLexSortedSet(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>getList(String name)Returns list instance by name.<V> RListReactive<V>getList(String name, Codec codec)<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>
RMapReactive<K,V>getMap(String name)Returns map instance by name.<K,V>
RMapReactive<K,V>getMap(String name, Codec codec)<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 bynameusing providedcodecfor both cache keys and values.<V> RQueueReactive<V>getQueue(String name)Returns queue instance by name.<V> RQueueReactive<V>getQueue(String name, Codec codec)<V> RScoredSortedSetReactive<V>getScoredSortedSet(String name)Returns Redis Sorted Set instance by name<V> RScoredSortedSetReactive<V>getScoredSortedSet(String name, Codec codec)RScriptReactivegetScript()Returns script operations objectRScriptReactivegetScript(Codec codec)Returns script operations object using provided codec.<V> RSetReactive<V>getSet(String name)Returns set instance by name.<V> RSetReactive<V>getSet(String name, Codec codec)<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 bynameusing providedcodecfor 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>
RStreamReactive<K,V>getStream(String name)Returns stream instance byname<K,V>
RStreamReactive<K,V>getStream(String name, Codec codec)Returns stream instance bynameusing providedcodecfor entries.RTopicReactivegetTopic(String name)Returns topic instance by name.RTopicReactivegetTopic(String name, Codec codec)
-
-
-
Constructor Detail
-
RedissonBatchReactive
public RedissonBatchReactive(EvictionScheduler evictionScheduler, ConnectionManager connectionManager, CommandReactiveExecutor commandExecutor, BatchOptions options)
-
-
Method Detail
-
getStream
public <K,V> RStreamReactive<K,V> getStream(String name)
Description copied from interface:RBatchReactiveReturns stream instance bynameRequires Redis 5.0.0 and higher.
- Specified by:
getStreamin interfaceRBatchReactive- Type Parameters:
K- type of keyV- type of value- Parameters:
name- of stream- Returns:
- RStream object
-
getStream
public <K,V> RStreamReactive<K,V> getStream(String name, Codec codec)
Description copied from interface:RBatchReactiveReturns stream instance bynameusing providedcodecfor entries.Requires Redis 5.0.0 and higher.
- Specified by:
getStreamin interfaceRBatchReactive- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of streamcodec- - codec for entry- Returns:
- RStream object
-
getBucket
public <V> RBucketReactive<V> getBucket(String name)
Description copied from interface:RBatchReactiveReturns object holder by name- Specified by:
getBucketin interfaceRBatchReactive- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- Bucket object
-
getBucket
public <V> RBucketReactive<V> getBucket(String name, Codec codec)
- Specified by:
getBucketin interfaceRBatchReactive
-
getHyperLogLog
public <V> RHyperLogLogReactive<V> getHyperLogLog(String name)
Description copied from interface:RBatchReactiveReturns HyperLogLog object by name- Specified by:
getHyperLogLogin interfaceRBatchReactive- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- HyperLogLog object
-
getHyperLogLog
public <V> RHyperLogLogReactive<V> getHyperLogLog(String name, Codec codec)
- Specified by:
getHyperLogLogin interfaceRBatchReactive
-
getList
public <V> RListReactive<V> getList(String name)
Description copied from interface:RBatchReactiveReturns list instance by name.- Specified by:
getListin interfaceRBatchReactive- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- List object
-
getList
public <V> RListReactive<V> getList(String name, Codec codec)
- Specified by:
getListin interfaceRBatchReactive
-
getMap
public <K,V> RMapReactive<K,V> getMap(String name)
Description copied from interface:RBatchReactiveReturns map instance by name.- Specified by:
getMapin interfaceRBatchReactive- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of object- Returns:
- Map object
-
getMap
public <K,V> RMapReactive<K,V> getMap(String name, Codec codec)
- Specified by:
getMapin interfaceRBatchReactive
-
getMapCache
public <K,V> RMapCacheReactive<K,V> getMapCache(String name, Codec codec)
Description copied from interface:RBatchReactiveReturns map-based cache instance bynameusing providedcodecfor 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:
getMapCachein interfaceRBatchReactive- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - codec for keys and values- Returns:
- MapCache object
-
getMapCache
public <K,V> RMapCacheReactive<K,V> getMapCache(String name)
Description copied from interface:RBatchReactiveReturns 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:
getMapCachein interfaceRBatchReactive- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of object- Returns:
- MapCache object
-
getSet
public <V> RSetReactive<V> getSet(String name)
Description copied from interface:RBatchReactiveReturns set instance by name.- Specified by:
getSetin interfaceRBatchReactive- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- Set object
-
getSet
public <V> RSetReactive<V> getSet(String name, Codec codec)
- Specified by:
getSetin interfaceRBatchReactive
-
getTopic
public RTopicReactive getTopic(String name)
Description copied from interface:RBatchReactiveReturns topic instance by name.- Specified by:
getTopicin interfaceRBatchReactive- Parameters:
name- - name of object- Returns:
- Topic object
-
getTopic
public RTopicReactive getTopic(String name, Codec codec)
- Specified by:
getTopicin interfaceRBatchReactive
-
getQueue
public <V> RQueueReactive<V> getQueue(String name)
Description copied from interface:RBatchReactiveReturns queue instance by name.- Specified by:
getQueuein interfaceRBatchReactive- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- Queue object
-
getQueue
public <V> RQueueReactive<V> getQueue(String name, Codec codec)
- Specified by:
getQueuein interfaceRBatchReactive
-
getBlockingQueue
public <V> RBlockingQueueReactive<V> getBlockingQueue(String name)
Description copied from interface:RBatchReactiveReturns blocking queue instance by name.- Specified by:
getBlockingQueuein interfaceRBatchReactive- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- BlockingQueue object
-
getBlockingQueue
public <V> RBlockingQueueReactive<V> getBlockingQueue(String name, Codec codec)
- Specified by:
getBlockingQueuein interfaceRBatchReactive
-
getDeque
public <V> RDequeReactive<V> getDeque(String name)
Description copied from interface:RBatchReactiveReturns deque instance by name.- Specified by:
getDequein interfaceRBatchReactive- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- Deque object
-
getDeque
public <V> RDequeReactive<V> getDeque(String name, Codec codec)
- Specified by:
getDequein interfaceRBatchReactive
-
getAtomicLong
public RAtomicLongReactive getAtomicLong(String name)
Description copied from interface:RBatchReactiveReturns "atomic long" instance by name.- Specified by:
getAtomicLongin interfaceRBatchReactive- Parameters:
name- - name of object- Returns:
- AtomicLong object
-
getSetCache
public <V> RSetCacheReactive<V> getSetCache(String name)
Description copied from interface:RBatchReactiveReturns 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:
getSetCachein interfaceRBatchReactive- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- SetCache object
-
getSetCache
public <V> RSetCacheReactive<V> getSetCache(String name, Codec codec)
Description copied from interface:RBatchReactiveReturns set-based cache instance bynameusing providedcodecfor 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:
getSetCachein interfaceRBatchReactive- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- SetCache object
-
getScoredSortedSet
public <V> RScoredSortedSetReactive<V> getScoredSortedSet(String name)
Description copied from interface:RBatchReactiveReturns Redis Sorted Set instance by name- Specified by:
getScoredSortedSetin interfaceRBatchReactive- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- ScoredSortedSet object
-
getScoredSortedSet
public <V> RScoredSortedSetReactive<V> getScoredSortedSet(String name, Codec codec)
- Specified by:
getScoredSortedSetin interfaceRBatchReactive
-
getLexSortedSet
public RLexSortedSetReactive getLexSortedSet(String name)
Description copied from interface:RBatchReactiveReturns 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:
getLexSortedSetin interfaceRBatchReactive- Parameters:
name- - name of object- Returns:
- LexSortedSet object
-
getBitSet
public RBitSetReactive getBitSet(String name)
Description copied from interface:RBatchReactiveReturns bitSet instance by name.- Specified by:
getBitSetin interfaceRBatchReactive- Parameters:
name- of bitSet- Returns:
- BitSet object
-
getScript
public RScriptReactive getScript()
Description copied from interface:RBatchReactiveReturns script operations object- Specified by:
getScriptin interfaceRBatchReactive- Returns:
- Script object
-
getScript
public RScriptReactive getScript(Codec codec)
Description copied from interface:RBatchReactiveReturns script operations object using provided codec.- Specified by:
getScriptin interfaceRBatchReactive- Parameters:
codec- - codec for params and result- Returns:
- Script object
-
getKeys
public RKeysReactive getKeys()
Description copied from interface:RBatchReactiveReturns keys operations. Each of Redis/Redisson object associated with own key- Specified by:
getKeysin interfaceRBatchReactive- Returns:
- Keys object
-
execute
public reactor.core.publisher.Mono<BatchResult<?>> execute()
Description copied from interface:RBatchReactiveExecutes 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:
executein interfaceRBatchReactive- Returns:
- List with result object for each command
-
discard
public reactor.core.publisher.Mono<Void> discard()
Description copied from interface:RBatchReactiveDiscard batched commands and release allocated buffers used for parameters encoding.- Specified by:
discardin interfaceRBatchReactive- Returns:
- void
-
getGeo
public <V> RGeoReactive<V> getGeo(String name)
Description copied from interface:RBatchReactiveReturns geospatial items holder instance byname.- Specified by:
getGeoin interfaceRBatchReactive- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- Geo object
-
getGeo
public <V> RGeoReactive<V> getGeo(String name, Codec codec)
Description copied from interface:RBatchReactiveReturns geospatial items holder instance bynameusing provided codec for geospatial members.- Specified by:
getGeoin interfaceRBatchReactive- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for value- Returns:
- Geo object
-
getSetMultimap
public <K,V> RSetMultimapReactive<K,V> getSetMultimap(String name)
Description copied from interface:RBatchReactiveReturns Set based Multimap instance by name.- Specified by:
getSetMultimapin interfaceRBatchReactive- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of object- Returns:
- SetMultimap object
-
getSetMultimap
public <K,V> RSetMultimapReactive<K,V> getSetMultimap(String name, Codec codec)
Description copied from interface:RBatchReactiveReturns Set based Multimap instance by name using provided codec for both map keys and values.- Specified by:
getSetMultimapin interfaceRBatchReactive- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - codec for keys and values- Returns:
- SetMultimap object
-
getListMultimap
public <K,V> RListMultimapReactive<K,V> getListMultimap(String name)
Description copied from interface:RBatchReactiveReturns List based MultiMap instance by name.- Specified by:
getListMultimapin interfaceRBatchReactive- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of object- Returns:
- ListMultimap object
-
getListMultimap
public <K,V> RListMultimapReactive<K,V> getListMultimap(String name, Codec codec)
Description copied from interface:RBatchReactiveReturns List based MultiMap instance by name using provided codec for both map keys and values.- Specified by:
getListMultimapin interfaceRBatchReactive- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - codec for keys and values- Returns:
- ListMultimap object
-
getAtomicDouble
public RAtomicDoubleReactive getAtomicDouble(String name)
Description copied from interface:RBatchReactiveReturns atomicDouble instance by name.- Specified by:
getAtomicDoublein interfaceRBatchReactive- Parameters:
name- - name of object- Returns:
- AtomicDouble object
-
getBlockingDeque
public <V> RBlockingDequeReactive<V> getBlockingDeque(String name)
Description copied from interface:RBatchReactiveReturns blocking deque instance by name.- Specified by:
getBlockingDequein interfaceRBatchReactive- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- BlockingDeque object
-
getBlockingDeque
public <V> RBlockingDequeReactive<V> getBlockingDeque(String name, Codec codec)
- Specified by:
getBlockingDequein interfaceRBatchReactive
-
-