Package org.redisson.api
Interface RBatchRx
- All Known Implementing Classes:
RedissonBatchRx
public interface RBatchRx
RxJava2 interface for Redis pipeline feature.
All method invocations on objects
from this interface are batched to separate queue and could be executed later
with execute()
method.
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionio.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.getAtomicDouble
(String name) Returns atomicDouble instance by name.getAtomicLong
(String name) Returns "atomic long" instance by 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>
Returns object holder by name<V> RBucketRx<V>
<V> RDequeRx<V>
Returns deque instance by name.<V> RDequeRx<V>
Returns interface for Redis Function featuregetFunction
(Codec codec) Returns interface for Redis Function feature using provided codec<V> RGeoRx<V>
Returns geospatial items holder instance byname
.<V> RGeoRx<V>
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) <V> RJsonBucketRx<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> RListRx<V>
Returns list instance by name.<V> RListRx<V>
<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> Returns map instance by name.<K,
V> RMapRx<K, V> <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>
Returns queue instance by name.<V> RQueueRx<V>
<V> RScoredSortedSetRx<V>
getScoredSortedSet
(String name) Returns Redis Sorted Set instance by name<V> RScoredSortedSetRx<V>
getScoredSortedSet
(String name, Codec codec) Returns script operations objectReturns script operations object using provided codec.<V> RSetRx<V>
Returns set instance by name.<V> RSetRx<V>
<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.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> RStreamRx<K, V> Returns stream instance byname
<K,
V> RStreamRx<K, V> Returns stream instance byname
using providedcodec
for entries.Returns topic instance by name.
-
Method Details
-
getStream
Returns stream instance byname
Requires Redis 5.0.0 and higher.
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- of stream- Returns:
- RStream object
-
getStream
Returns stream instance byname
using providedcodec
for entries.Requires Redis 5.0.0 and higher.
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of streamcodec
- - codec for entry- Returns:
- RStream object
-
getGeo
Returns geospatial items holder instance byname
.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Geo object
-
getGeo
Returns geospatial items holder instance byname
using provided codec for geospatial members.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for value- Returns:
- Geo object
-
getSetMultimap
Returns Set based Multimap instance by name.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- SetMultimap object
-
getSetMultimap
Returns Set based Multimap instance by name using provided codec for both map keys and values.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- SetMultimap object
-
getSetMultimapCache
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 multimapgetSetMultimap(String)
.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- RSetMultimapCacheRx object
-
getSetMultimapCache
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 multimapgetSetMultimap(String, Codec)
.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- RSetMultimapCacheRx object
-
getSetCache
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
getSet(String, Codec)
.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- SetCache object
-
getSetCache
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
getSet(String, Codec)
.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- SetCache object
-
getMapCache
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
getMap(String, Codec)
.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- MapCache object
-
getMapCache
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
getMap(String)
.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- MapCache object
-
getBucket
Returns object holder by name- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Bucket object
-
getBucket
-
getJsonBucket
Returns JSON data holder instance by name using provided codec.- Type Parameters:
V
- type of value- Parameters:
name
- name of objectcodec
- codec for values- Returns:
- JsonBucket object
- See Also:
-
getHyperLogLog
Returns HyperLogLog object by name- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- HyperLogLog object
-
getHyperLogLog
-
getList
Returns list instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- List object
-
getList
-
getListMultimap
Returns List based MultiMap instance by name.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- ListMultimap object
-
getListMultimap
Returns List based MultiMap instance by name using provided codec for both map keys and values.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- ListMultimap object
-
getListMultimapCache
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 multimapgetListMultimap(String)
.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- RListMultimapCacheRx object
-
getListMultimapCache
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 multimapgetListMultimap(String, Codec)
.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- RListMultimapCacheRx object
-
getMap
Returns map instance by name.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- Map object
-
getMap
-
getSet
Returns set instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Set object
-
getSet
-
getTopic
Returns topic instance by name.- Parameters:
name
- - name of object- Returns:
- Topic object
-
getTopic
-
getShardedTopic
Returns Sharded Topic instance by name.Messages are delivered to message listeners connected to the same Topic.
- Parameters:
name
- - name of object- Returns:
- Topic object
-
getShardedTopic
Returns Sharded Topic instance by name using provided codec for messages.Messages are delivered to message listeners connected to the same Topic.
- Parameters:
name
- - name of objectcodec
- - codec for message- Returns:
- Topic object
-
getQueue
Returns queue instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Queue object
-
getQueue
-
getBlockingQueue
Returns blocking queue instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- BlockingQueue object
-
getBlockingQueue
-
getBlockingDeque
Returns blocking deque instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- BlockingDeque object
-
getBlockingDeque
-
getDeque
Returns deque instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Deque object
-
getDeque
-
getAtomicLong
Returns "atomic long" instance by name.- Parameters:
name
- - name of object- Returns:
- AtomicLong object
-
getAtomicDouble
Returns atomicDouble instance by name.- Parameters:
name
- - name of object- Returns:
- AtomicDouble object
-
getScoredSortedSet
Returns Redis Sorted Set instance by name- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- ScoredSortedSet object
-
getScoredSortedSet
-
getLexSortedSet
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- Parameters:
name
- - name of object- Returns:
- LexSortedSet object
-
getBitSet
Returns bitSet instance by name.- Parameters:
name
- of bitSet- Returns:
- BitSet object
-
getScript
RScriptRx getScript()Returns script operations object- Returns:
- Script object
-
getScript
Returns script operations object using provided codec.- Parameters:
codec
- - codec for params and result- Returns:
- Script object
-
getFunction
RFunctionRx getFunction()Returns interface for Redis Function feature- Returns:
- function object
-
getFunction
Returns interface for Redis Function feature using provided codec- Parameters:
codec
- - codec for params and result- Returns:
- function interface
-
getKeys
RKeysRx getKeys()Returns keys operations. Each of Redis/Redisson object associated with own key- Returns:
- Keys object
-
execute
io.reactivex.rxjava3.core.Maybe<BatchResult<?>> execute()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- Returns:
- List with result object for each command
-
discard
io.reactivex.rxjava3.core.Completable discard()Discard batched commands and release allocated buffers used for parameters encoding.- Returns:
- void
-