Package org.redisson.rx
Class RedissonBatchRx
- java.lang.Object
-
- org.redisson.rx.RedissonBatchRx
-
-
Constructor Summary
Constructors Constructor Description RedissonBatchRx(EvictionScheduler evictionScheduler, ConnectionManager connectionManager, CommandRxExecutor commandExecutor, BatchOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.reactivex.rxjava3.core.Completable
discard()
Discard batched commands and release allocated buffers used for parameters encoding.io.reactivex.rxjava3.core.Maybe<BatchResult<?>>
execute()
Executes all operations accumulated during Reactive methods invocations Reactivehronously.RAtomicDoubleRx
getAtomicDouble(String name)
Returns atomicDouble instance by name.RAtomicLongRx
getAtomicLong(String name)
Returns "atomic long" instance by name.RBitSetRx
getBitSet(String name)
Returns bitSet instance by name.<V> RBlockingDequeRx<V>
getBlockingDeque(String name)
Returns blocking deque instance by name.<V> RBlockingDequeRx<V>
getBlockingDeque(String name, Codec codec)
<V> RBlockingQueueRx<V>
getBlockingQueue(String name)
Returns blocking queue instance by name.<V> RBlockingQueueRx<V>
getBlockingQueue(String name, Codec codec)
<V> RBucketRx<V>
getBucket(String name)
Returns object holder by name<V> RBucketRx<V>
getBucket(String name, Codec codec)
<V> RDequeRx<V>
getDeque(String name)
Returns deque instance by name.<V> RDequeRx<V>
getDeque(String name, Codec codec)
<V> RGeoRx<V>
getGeo(String name)
Returns geospatial items holder instance byname
.<V> RGeoRx<V>
getGeo(String name, Codec codec)
Returns geospatial items holder instance byname
using provided codec for geospatial members.<V> RHyperLogLogRx<V>
getHyperLogLog(String name)
Returns HyperLogLog object by name<V> RHyperLogLogRx<V>
getHyperLogLog(String name, Codec codec)
RKeysRx
getKeys()
Returns keys operations.RLexSortedSetRx
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> RListRx<V>
getList(String name)
Returns list instance by name.<V> RListRx<V>
getList(String name, Codec codec)
<K,V>
RListMultimapRx<K,V>getListMultimap(String name)
Returns List based MultiMap instance by name.<K,V>
RListMultimapRx<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>
RListMultimapCacheRx<K,V>getListMultimapCache(String name)
Returns List based Multimap cache instance by name.<K,V>
RListMultimapCacheRx<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>
RMapRx<K,V>getMap(String name)
Returns map instance by name.<K,V>
RMapRx<K,V>getMap(String name, Codec codec)
<K,V>
RMapCacheRx<K,V>getMapCache(String name)
Returns map-based cache instance byname
.<K,V>
RMapCacheRx<K,V>getMapCache(String name, Codec codec)
Returns map-based cache instance byname
using providedcodec
for both cache keys and values.<V> RQueueRx<V>
getQueue(String name)
Returns queue instance by name.<V> RQueueRx<V>
getQueue(String name, Codec codec)
<V> RScoredSortedSetRx<V>
getScoredSortedSet(String name)
Returns Redis Sorted Set instance by name<V> RScoredSortedSetRx<V>
getScoredSortedSet(String name, Codec codec)
RScriptRx
getScript()
Returns script operations objectRScriptRx
getScript(Codec codec)
Returns script operations object using provided codec.<V> RSetRx<V>
getSet(String name)
Returns set instance by name.<V> RSetRx<V>
getSet(String name, Codec codec)
<V> RSetCacheRx<V>
getSetCache(String name)
Returns set-based cache instance byname
.<V> RSetCacheRx<V>
getSetCache(String name, Codec codec)
Returns set-based cache instance byname
using providedcodec
for values.<K,V>
RSetMultimapRx<K,V>getSetMultimap(String name)
Returns Set based Multimap instance by name.<K,V>
RSetMultimapRx<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>
RSetMultimapCacheRx<K,V>getSetMultimapCache(String name)
Returns Set based Multimap cache instance by name.<K,V>
RSetMultimapCacheRx<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>
RStreamRx<K,V>getStream(String name)
Returns stream instance byname
<K,V>
RStreamRx<K,V>getStream(String name, Codec codec)
Returns stream instance byname
using providedcodec
for entries.RTopicRx
getTopic(String name)
Returns topic instance by name.RTopicRx
getTopic(String name, Codec codec)
-
-
-
Constructor Detail
-
RedissonBatchRx
public RedissonBatchRx(EvictionScheduler evictionScheduler, ConnectionManager connectionManager, CommandRxExecutor commandExecutor, BatchOptions options)
-
-
Method Detail
-
getStream
public <K,V> RStreamRx<K,V> getStream(String name)
Description copied from interface:RBatchRx
Returns stream instance byname
Requires Redis 5.0.0 and higher.
-
getStream
public <K,V> RStreamRx<K,V> getStream(String name, Codec codec)
Description copied from interface:RBatchRx
Returns stream instance byname
using providedcodec
for entries.Requires Redis 5.0.0 and higher.
-
getBucket
public <V> RBucketRx<V> getBucket(String name)
Description copied from interface:RBatchRx
Returns object holder by name
-
getHyperLogLog
public <V> RHyperLogLogRx<V> getHyperLogLog(String name)
Description copied from interface:RBatchRx
Returns HyperLogLog object by name- Specified by:
getHyperLogLog
in interfaceRBatchRx
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- HyperLogLog object
-
getHyperLogLog
public <V> RHyperLogLogRx<V> getHyperLogLog(String name, Codec codec)
- Specified by:
getHyperLogLog
in interfaceRBatchRx
-
getList
public <V> RListRx<V> getList(String name)
Description copied from interface:RBatchRx
Returns list instance by name.
-
getMap
public <K,V> RMapRx<K,V> getMap(String name)
Description copied from interface:RBatchRx
Returns map instance by name.
-
getMapCache
public <K,V> RMapCacheRx<K,V> getMapCache(String name, Codec codec)
Description copied from interface:RBatchRx
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
RBatchRx.getMap(String, Codec)
.- Specified by:
getMapCache
in interfaceRBatchRx
- 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> RMapCacheRx<K,V> getMapCache(String name)
Description copied from interface:RBatchRx
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
RBatchRx.getMap(String)
.- Specified by:
getMapCache
in interfaceRBatchRx
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- MapCache object
-
getSet
public <V> RSetRx<V> getSet(String name)
Description copied from interface:RBatchRx
Returns set instance by name.
-
getTopic
public RTopicRx getTopic(String name)
Description copied from interface:RBatchRx
Returns topic instance by name.
-
getQueue
public <V> RQueueRx<V> getQueue(String name)
Description copied from interface:RBatchRx
Returns queue instance by name.
-
getBlockingQueue
public <V> RBlockingQueueRx<V> getBlockingQueue(String name)
Description copied from interface:RBatchRx
Returns blocking queue instance by name.- Specified by:
getBlockingQueue
in interfaceRBatchRx
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- BlockingQueue object
-
getBlockingQueue
public <V> RBlockingQueueRx<V> getBlockingQueue(String name, Codec codec)
- Specified by:
getBlockingQueue
in interfaceRBatchRx
-
getDeque
public <V> RDequeRx<V> getDeque(String name)
Description copied from interface:RBatchRx
Returns deque instance by name.
-
getAtomicLong
public RAtomicLongRx getAtomicLong(String name)
Description copied from interface:RBatchRx
Returns "atomic long" instance by name.- Specified by:
getAtomicLong
in interfaceRBatchRx
- Parameters:
name
- - name of object- Returns:
- AtomicLong object
-
getSetCache
public <V> RSetCacheRx<V> getSetCache(String name)
Description copied from interface:RBatchRx
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
RBatchRx.getSet(String, Codec)
.- Specified by:
getSetCache
in interfaceRBatchRx
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- SetCache object
-
getSetCache
public <V> RSetCacheRx<V> getSetCache(String name, Codec codec)
Description copied from interface:RBatchRx
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
RBatchRx.getSet(String, Codec)
.- Specified by:
getSetCache
in interfaceRBatchRx
- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- SetCache object
-
getScoredSortedSet
public <V> RScoredSortedSetRx<V> getScoredSortedSet(String name)
Description copied from interface:RBatchRx
Returns Redis Sorted Set instance by name- Specified by:
getScoredSortedSet
in interfaceRBatchRx
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- ScoredSortedSet object
-
getScoredSortedSet
public <V> RScoredSortedSetRx<V> getScoredSortedSet(String name, Codec codec)
- Specified by:
getScoredSortedSet
in interfaceRBatchRx
-
getLexSortedSet
public RLexSortedSetRx getLexSortedSet(String name)
Description copied from interface:RBatchRx
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 interfaceRBatchRx
- Parameters:
name
- - name of object- Returns:
- LexSortedSet object
-
getBitSet
public RBitSetRx getBitSet(String name)
Description copied from interface:RBatchRx
Returns bitSet instance by name.
-
getScript
public RScriptRx getScript()
Description copied from interface:RBatchRx
Returns script operations object
-
getScript
public RScriptRx getScript(Codec codec)
Description copied from interface:RBatchRx
Returns script operations object using provided codec.
-
getKeys
public RKeysRx getKeys()
Description copied from interface:RBatchRx
Returns keys operations. Each of Redis/Redisson object associated with own key
-
execute
public io.reactivex.rxjava3.core.Maybe<BatchResult<?>> execute()
Description copied from interface:RBatchRx
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
-
discard
public io.reactivex.rxjava3.core.Completable discard()
Description copied from interface:RBatchRx
Discard batched commands and release allocated buffers used for parameters encoding.
-
getGeo
public <V> RGeoRx<V> getGeo(String name)
Description copied from interface:RBatchRx
Returns geospatial items holder instance byname
.
-
getGeo
public <V> RGeoRx<V> getGeo(String name, Codec codec)
Description copied from interface:RBatchRx
Returns geospatial items holder instance byname
using provided codec for geospatial members.
-
getSetMultimap
public <K,V> RSetMultimapRx<K,V> getSetMultimap(String name)
Description copied from interface:RBatchRx
Returns Set based Multimap instance by name.- Specified by:
getSetMultimap
in interfaceRBatchRx
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- SetMultimap object
-
getSetMultimap
public <K,V> RSetMultimapRx<K,V> getSetMultimap(String name, Codec codec)
Description copied from interface:RBatchRx
Returns Set based Multimap instance by name using provided codec for both map keys and values.- Specified by:
getSetMultimap
in interfaceRBatchRx
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- SetMultimap object
-
getSetMultimapCache
public <K,V> RSetMultimapCacheRx<K,V> getSetMultimapCache(String name)
Description copied from interface:RBatchRx
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 multimapRBatchRx.getSetMultimap(String)
.- Specified by:
getSetMultimapCache
in interfaceRBatchRx
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- RSetMultimapCacheRx object
-
getSetMultimapCache
public <K,V> RSetMultimapCacheRx<K,V> getSetMultimapCache(String name, Codec codec)
Description copied from interface:RBatchRx
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 multimapRBatchRx.getSetMultimap(String, Codec)
.- Specified by:
getSetMultimapCache
in interfaceRBatchRx
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- RSetMultimapCacheRx object
-
getListMultimap
public <K,V> RListMultimapRx<K,V> getListMultimap(String name)
Description copied from interface:RBatchRx
Returns List based MultiMap instance by name.- Specified by:
getListMultimap
in interfaceRBatchRx
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- ListMultimap object
-
getListMultimap
public <K,V> RListMultimapRx<K,V> getListMultimap(String name, Codec codec)
Description copied from interface:RBatchRx
Returns List based MultiMap instance by name using provided codec for both map keys and values.- Specified by:
getListMultimap
in interfaceRBatchRx
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- ListMultimap object
-
getListMultimapCache
public <K,V> RListMultimapCacheRx<K,V> getListMultimapCache(String name)
Description copied from interface:RBatchRx
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 multimapRBatchRx.getListMultimap(String)
.- Specified by:
getListMultimapCache
in interfaceRBatchRx
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- RListMultimapCacheRx object
-
getListMultimapCache
public <K,V> RListMultimapCacheRx<K,V> getListMultimapCache(String name, Codec codec)
Description copied from interface:RBatchRx
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 multimapRBatchRx.getListMultimap(String, Codec)
.- Specified by:
getListMultimapCache
in interfaceRBatchRx
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- RListMultimapCacheRx object
-
getAtomicDouble
public RAtomicDoubleRx getAtomicDouble(String name)
Description copied from interface:RBatchRx
Returns atomicDouble instance by name.- Specified by:
getAtomicDouble
in interfaceRBatchRx
- Parameters:
name
- - name of object- Returns:
- AtomicDouble object
-
getBlockingDeque
public <V> RBlockingDequeRx<V> getBlockingDeque(String name)
Description copied from interface:RBatchRx
Returns blocking deque instance by name.- Specified by:
getBlockingDeque
in interfaceRBatchRx
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- BlockingDeque object
-
getBlockingDeque
public <V> RBlockingDequeRx<V> getBlockingDeque(String name, Codec codec)
- Specified by:
getBlockingDeque
in interfaceRBatchRx
-
-