Class RedissonReactive
- java.lang.Object
-
- org.redisson.RedissonReactive
-
- All Implemented Interfaces:
RedissonReactiveClient
public class RedissonReactive extends Object implements RedissonReactiveClient
Main infrastructure class allows to get access to all Redisson objects on top of Redis server.- Author:
- Nikita Koksharov
-
-
Field Summary
Fields Modifier and Type Field Description protected CommandReactiveExecutor
commandExecutor
protected ConnectionManager
connectionManager
protected EvictionScheduler
evictionScheduler
protected ConcurrentMap<String,ResponseEntry>
responses
protected WriteBehindService
writeBehindService
-
Constructor Summary
Constructors Modifier Constructor Description protected
RedissonReactive(Config config)
protected
RedissonReactive(ConnectionManager connectionManager, EvictionScheduler evictionScheduler, WriteBehindService writeBehindService, ConcurrentMap<String,ResponseEntry> responses)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RBatchReactive
createBatch()
Return batch object which executes group of command in pipeline.RBatchReactive
createBatch(BatchOptions options)
Return batch object which executes group of command in pipeline.RTransactionReactive
createTransaction(TransactionOptions options)
Creates transaction with READ_COMMITTED isolation level.<V> List<RBucketReactive<V>>
findBuckets(String pattern)
Returns a list of object holder instances by a key patternRAtomicDoubleReactive
getAtomicDouble(String name)
Returns "atomic double" instance by name.RAtomicLongReactive
getAtomicLong(String name)
Returns "atomic long" instance by name.RBinaryStreamReactive
getBinaryStream(String name)
Returns binary stream holder instance byname
RBitSetReactive
getBitSet(String name)
Returns bitSet instance by name.<V> RBlockingDequeReactive<V>
getBlockingDeque(String name)
Returns unbounded blocking deque instance by name.<V> RBlockingDequeReactive<V>
getBlockingDeque(String name, Codec codec)
Returns unbounded blocking deque instance by name using provided codec for deque objects.<V> RBlockingQueueReactive<V>
getBlockingQueue(String name)
Returns blocking queue instance by name.<V> RBlockingQueueReactive<V>
getBlockingQueue(String name, Codec codec)
Returns blocking queue instance by name using provided codec for queue objects.<V> RBucketReactive<V>
getBucket(String name)
Returns object holder instance by name<V> RBucketReactive<V>
getBucket(String name, Codec codec)
Returns object holder instance by name using provided codec for object.RBucketsReactive
getBuckets()
Returns interface for mass operations with Bucket objects.RBucketsReactive
getBuckets(Codec codec)
Returns interface for mass operations with Bucket objects using provided codec for object.NodesGroup<ClusterNode>
getClusterNodesGroup()
Get Redis cluster nodes group for server operationsCommandReactiveExecutor
getCommandExecutor()
Config
getConfig()
Allows to get configuration provided during Redisson instance creation.ConnectionManager
getConnectionManager()
RCountDownLatchReactive
getCountDownLatch(String name)
Returns CountDownLatch instance by name.<V> RDequeReactive<V>
getDeque(String name)
Returns deque instance by name.<V> RDequeReactive<V>
getDeque(String name, Codec codec)
Returns deque instance by name using provided codec for deque objects.EvictionScheduler
getEvictionScheduler()
RLockReactive
getFairLock(String name)
Returns Lock instance by name.<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 byname
using provided codec for geospatial members.<V> RHyperLogLogReactive<V>
getHyperLogLog(String name)
Returns HyperLogLog instance by name.<V> RHyperLogLogReactive<V>
getHyperLogLog(String name, Codec codec)
Returns HyperLogLog instance by name using provided codec for hll objects.String
getId()
Returns id of this Redisson instanceRIdGeneratorReactive
getIdGenerator(String name)
Returns id generator by name.RKeysReactive
getKeys()
Returns keys operations.RLexSortedSetReactive
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>
getList(String name)
Returns list instance by name.<V> RListReactive<V>
getList(String name, Codec codec)
Returns list instance by name using provided codec for list objects.<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.RLockReactive
getLock(String name)
Returns Lock instance by name.<K,V>
RMapReactive<K,V>getMap(String name)
Returns map instance by name.<K,V>
RMapReactive<K,V>getMap(String name, MapOptions<K,V> options)
Returns map instance by name.<K,V>
RMapReactive<K,V>getMap(String name, Codec codec)
Returns map instance by name using provided codec for both map keys and values.<K,V>
RMapReactive<K,V>getMap(String name, Codec codec, MapOptions<K,V> options)
Returns map instance by name using provided codec for both map keys and values.<K,V>
RMapCacheReactive<K,V>getMapCache(String name)
Returns map-based cache instance by name.<K,V>
RMapCacheReactive<K,V>getMapCache(String name, MapOptions<K,V> options)
Returns map-based cache instance by name.<K,V>
RMapCacheReactive<K,V>getMapCache(String name, Codec codec)
Returns map-based cache instance by name using provided codec for both cache keys and values.<K,V>
RMapCacheReactive<K,V>getMapCache(String name, Codec codec, MapOptions<K,V> options)
Returns map-based cache instance byname
using providedcodec
for both cache keys and values.RLockReactive
getMultiLock(RLock... locks)
Returns MultiLock instance associated with specifiedlocks
NodesGroup<Node>
getNodesGroup()
Get Redis nodes group for server operationsRPatternTopicReactive
getPatternTopic(String pattern)
Returns topic instance satisfies by pattern name.RPatternTopicReactive
getPatternTopic(String pattern, Codec codec)
Returns topic instance satisfies by pattern name using provided codec for messages.RPermitExpirableSemaphoreReactive
getPermitExpirableSemaphore(String name)
Returns semaphore instance by name.<V> RQueueReactive<V>
getQueue(String name)
Returns queue instance by name.<V> RQueueReactive<V>
getQueue(String name, Codec codec)
Returns queue instance by name using provided codec for queue objects.RRateLimiterReactive
getRateLimiter(String name)
Returns rate limiter instance byname
RReadWriteLockReactive
getReadWriteLock(String name)
Returns ReadWriteLock instance by name.RLockReactive
getRedLock(RLock... locks)
RReliableTopicReactive
getReliableTopic(String name)
Returns reliable topic instance by name.RReliableTopicReactive
getReliableTopic(String name, Codec codec)
Returns reliable topic instance by name using provided codec for messages.RRemoteService
getRemoteService()
Returns object for remote operations prefixed with the default name (redisson_remote_service)RRemoteService
getRemoteService(String name)
Returns object for remote operations prefixed with the specified nameRRemoteService
getRemoteService(String name, Codec codec)
Returns object for remote operations prefixed with the specified name and uses provided codec for method arguments and result.RRemoteService
getRemoteService(Codec codec)
Returns object for remote operations prefixed with the default name (redisson_remote_service) and uses provided codec for method arguments and result.<V> RRingBufferReactive<V>
getRingBuffer(String name)
Returns RingBuffer based queue.<V> RRingBufferReactive<V>
getRingBuffer(String name, Codec codec)
Returns RingBuffer based queue.<V> RScoredSortedSetReactive<V>
getScoredSortedSet(String name)
Returns Redis Sorted Set instance by name.<V> RScoredSortedSetReactive<V>
getScoredSortedSet(String name, Codec codec)
Returns Redis Sorted Set instance by name using provided codec for sorted set objects.RScriptReactive
getScript()
Returns script operations objectRScriptReactive
getScript(Codec codec)
Returns script operations object using provided codec.RSemaphoreReactive
getSemaphore(String name)
Returns semaphore instance by name<V> RSetReactive<V>
getSet(String name)
Returns set instance by name.<V> RSetReactive<V>
getSet(String name, Codec codec)
Returns set instance by name using provided codec for set objects.<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
.<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.RLockReactive
getSpinLock(String name)
Returns Spin lock instance by name.RLockReactive
getSpinLock(String name, LockOptions.BackOff backOff)
Returns Spin lock instance by name with specified back off options.<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 byname
using providedcodec
for entries.<V> RTimeSeriesReactive<V>
getTimeSeries(String name)
Returns time-series instance byname
<V> RTimeSeriesReactive<V>
getTimeSeries(String name, Codec codec)
Returns time-series instance byname
using providedcodec
for values.RTopicReactive
getTopic(String name)
Returns topic instance by name.RTopicReactive
getTopic(String name, Codec codec)
Returns topic instance by name using provided codec for messages.<V> RTransferQueueReactive<V>
getTransferQueue(String name)
Returns transfer queue instance by name.<V> RTransferQueueReactive<V>
getTransferQueue(String name, Codec codec)
Returns transfer queue instance by name using provided codec for queue objects.boolean
isShutdown()
Returnstrue
if this Redisson instance has been shut down.boolean
isShuttingDown()
Returnstrue
if this Redisson instance was started to be shutdown or was shutdownRedissonReactiveClient.isShutdown()
already.void
shutdown()
Shuts down Redisson instance NOT Redis server
-
-
-
Field Detail
-
writeBehindService
protected final WriteBehindService writeBehindService
-
evictionScheduler
protected final EvictionScheduler evictionScheduler
-
commandExecutor
protected final CommandReactiveExecutor commandExecutor
-
connectionManager
protected final ConnectionManager connectionManager
-
responses
protected final ConcurrentMap<String,ResponseEntry> responses
-
-
Constructor Detail
-
RedissonReactive
protected RedissonReactive(Config config)
-
RedissonReactive
protected RedissonReactive(ConnectionManager connectionManager, EvictionScheduler evictionScheduler, WriteBehindService writeBehindService, ConcurrentMap<String,ResponseEntry> responses)
-
-
Method Detail
-
getEvictionScheduler
public EvictionScheduler getEvictionScheduler()
-
getConnectionManager
public ConnectionManager getConnectionManager()
-
getCommandExecutor
public CommandReactiveExecutor getCommandExecutor()
-
getStream
public <K,V> RStreamReactive<K,V> getStream(String name)
Description copied from interface:RedissonReactiveClient
Returns stream instance byname
Requires Redis 5.0.0 and higher.
- Specified by:
getStream
in interfaceRedissonReactiveClient
- 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:RedissonReactiveClient
Returns stream instance byname
using providedcodec
for entries.Requires Redis 5.0.0 and higher.
- Specified by:
getStream
in interfaceRedissonReactiveClient
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of streamcodec
- - codec for entry- Returns:
- RStream object
-
getGeo
public <V> RGeoReactive<V> getGeo(String name)
Description copied from interface:RedissonReactiveClient
Returns geospatial items holder instance byname
.- Specified by:
getGeo
in interfaceRedissonReactiveClient
- 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:RedissonReactiveClient
Returns geospatial items holder instance byname
using provided codec for geospatial members.- Specified by:
getGeo
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for value- Returns:
- Geo object
-
getFairLock
public RLockReactive getFairLock(String name)
Description copied from interface:RedissonReactiveClient
Returns Lock instance by name.Implements a fair locking so it guarantees an acquire order by threads.
To increase reliability during failover, all operations wait for propagation to all Redis slaves.
- Specified by:
getFairLock
in interfaceRedissonReactiveClient
- Parameters:
name
- - name of object- Returns:
- Lock object
-
getRateLimiter
public RRateLimiterReactive getRateLimiter(String name)
Description copied from interface:RedissonReactiveClient
Returns rate limiter instance byname
- Specified by:
getRateLimiter
in interfaceRedissonReactiveClient
- Parameters:
name
- of rate limiter- Returns:
- RateLimiter object
-
getBinaryStream
public RBinaryStreamReactive getBinaryStream(String name)
Description copied from interface:RedissonReactiveClient
Returns binary stream holder instance byname
- Specified by:
getBinaryStream
in interfaceRedissonReactiveClient
- Parameters:
name
- of binary stream- Returns:
- BinaryStream object
-
getSemaphore
public RSemaphoreReactive getSemaphore(String name)
Description copied from interface:RedissonReactiveClient
Returns semaphore instance by name- Specified by:
getSemaphore
in interfaceRedissonReactiveClient
- Parameters:
name
- - name of object- Returns:
- Semaphore object
-
getPermitExpirableSemaphore
public RPermitExpirableSemaphoreReactive getPermitExpirableSemaphore(String name)
Description copied from interface:RedissonReactiveClient
Returns semaphore instance by name. Supports lease time parameter for each acquired permit.- Specified by:
getPermitExpirableSemaphore
in interfaceRedissonReactiveClient
- Parameters:
name
- - name of object- Returns:
- PermitExpirableSemaphore object
-
getReadWriteLock
public RReadWriteLockReactive getReadWriteLock(String name)
Description copied from interface:RedissonReactiveClient
Returns ReadWriteLock instance by name.To increase reliability during failover, all operations wait for propagation to all Redis slaves.
- Specified by:
getReadWriteLock
in interfaceRedissonReactiveClient
- Parameters:
name
- - name of object- Returns:
- Lock object
-
getLock
public RLockReactive getLock(String name)
Description copied from interface:RedissonReactiveClient
Returns Lock instance by name.Implements a non-fair locking so doesn't guarantees an acquire order by threads.
To increase reliability during failover, all operations wait for propagation to all Redis slaves.
- Specified by:
getLock
in interfaceRedissonReactiveClient
- Parameters:
name
- - name of object- Returns:
- Lock object
-
getSpinLock
public RLockReactive getSpinLock(String name)
Description copied from interface:RedissonReactiveClient
Returns Spin lock instance by name.Implements a non-fair locking so doesn't guarantees an acquire order by threads.
Lock doesn't use a pub/sub mechanism
- Specified by:
getSpinLock
in interfaceRedissonReactiveClient
- Parameters:
name
- - name of object- Returns:
- Lock object
-
getSpinLock
public RLockReactive getSpinLock(String name, LockOptions.BackOff backOff)
Description copied from interface:RedissonReactiveClient
Returns Spin lock instance by name with specified back off options.Implements a non-fair locking so doesn't guarantees an acquire order by threads.
Lock doesn't use a pub/sub mechanism
- Specified by:
getSpinLock
in interfaceRedissonReactiveClient
- Parameters:
name
- - name of object- Returns:
- Lock object
-
getMultiLock
public RLockReactive getMultiLock(RLock... locks)
Description copied from interface:RedissonReactiveClient
Returns MultiLock instance associated with specifiedlocks
- Specified by:
getMultiLock
in interfaceRedissonReactiveClient
- Parameters:
locks
- - collection of locks- Returns:
- MultiLock object
-
getRedLock
public RLockReactive getRedLock(RLock... locks)
- Specified by:
getRedLock
in interfaceRedissonReactiveClient
-
getCountDownLatch
public RCountDownLatchReactive getCountDownLatch(String name)
Description copied from interface:RedissonReactiveClient
Returns CountDownLatch instance by name.- Specified by:
getCountDownLatch
in interfaceRedissonReactiveClient
- Parameters:
name
- - name of object- Returns:
- CountDownLatch object
-
getMapCache
public <K,V> RMapCacheReactive<K,V> getMapCache(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns map-based cache instance by name using provided codec for both cache keys and values. Supports entry eviction with a given MaxIdleTime and TTL settings.If eviction is not required then it's better to use regular map
RedissonReactiveClient.getMap(String, Codec)
.- Specified by:
getMapCache
in interfaceRedissonReactiveClient
- Type Parameters:
K
- type of keysV
- type of values- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- MapCache object
-
getMapCache
public <K,V> RMapCacheReactive<K,V> getMapCache(String name)
Description copied from interface:RedissonReactiveClient
Returns map-based cache instance by name. Supports entry eviction with a given MaxIdleTime and TTL settings.If eviction is not required then it's better to use regular map
RedissonReactiveClient.getMap(String)
.- Specified by:
getMapCache
in interfaceRedissonReactiveClient
- Type Parameters:
K
- type of keysV
- type of values- Parameters:
name
- - name of object- Returns:
- MapCache object
-
getBucket
public <V> RBucketReactive<V> getBucket(String name)
Description copied from interface:RedissonReactiveClient
Returns object holder instance by name- Specified by:
getBucket
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Bucket object
-
getBucket
public <V> RBucketReactive<V> getBucket(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns object holder instance by name using provided codec for object.- Specified by:
getBucket
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for value- Returns:
- Bucket object
-
getBuckets
public RBucketsReactive getBuckets()
Description copied from interface:RedissonReactiveClient
Returns interface for mass operations with Bucket objects.- Specified by:
getBuckets
in interfaceRedissonReactiveClient
- Returns:
- Buckets
-
getBuckets
public RBucketsReactive getBuckets(Codec codec)
Description copied from interface:RedissonReactiveClient
Returns interface for mass operations with Bucket objects using provided codec for object.- Specified by:
getBuckets
in interfaceRedissonReactiveClient
- Parameters:
codec
- - codec for bucket objects- Returns:
- Buckets
-
findBuckets
public <V> List<RBucketReactive<V>> findBuckets(String pattern)
Description copied from interface:RedissonReactiveClient
Returns a list of object holder instances by a key pattern- Specified by:
findBuckets
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of value- Parameters:
pattern
- - pattern for name of buckets- Returns:
- list of buckets
-
getHyperLogLog
public <V> RHyperLogLogReactive<V> getHyperLogLog(String name)
Description copied from interface:RedissonReactiveClient
Returns HyperLogLog instance by name.- Specified by:
getHyperLogLog
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- - name of object- Returns:
- HyperLogLog object
-
getHyperLogLog
public <V> RHyperLogLogReactive<V> getHyperLogLog(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns HyperLogLog instance by name using provided codec for hll objects.- Specified by:
getHyperLogLog
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- - name of objectcodec
- - codec of values- Returns:
- HyperLogLog object
-
getIdGenerator
public RIdGeneratorReactive getIdGenerator(String name)
Description copied from interface:RedissonReactiveClient
Returns id generator by name.- Specified by:
getIdGenerator
in interfaceRedissonReactiveClient
- Parameters:
name
- - name of object- Returns:
- IdGenerator object
-
getList
public <V> RListReactive<V> getList(String name)
Description copied from interface:RedissonReactiveClient
Returns list instance by name.- Specified by:
getList
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- - name of object- Returns:
- List object
-
getList
public <V> RListReactive<V> getList(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns list instance by name using provided codec for list objects.- Specified by:
getList
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- List object
-
getListMultimap
public <K,V> RListMultimapReactive<K,V> getListMultimap(String name)
Description copied from interface:RedissonReactiveClient
Returns List based Multimap instance by name.- Specified by:
getListMultimap
in interfaceRedissonReactiveClient
- 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:RedissonReactiveClient
Returns List based Multimap instance by name using provided codec for both map keys and values.- Specified by:
getListMultimap
in interfaceRedissonReactiveClient
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- RListMultimapReactive object
-
getSetMultimap
public <K,V> RSetMultimapReactive<K,V> getSetMultimap(String name)
Description copied from interface:RedissonReactiveClient
Returns Set based Multimap instance by name.- Specified by:
getSetMultimap
in interfaceRedissonReactiveClient
- 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:RedissonReactiveClient
Returns Set based Multimap instance by name using provided codec for both map keys and values.- Specified by:
getSetMultimap
in interfaceRedissonReactiveClient
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- SetMultimap object
-
getMap
public <K,V> RMapReactive<K,V> getMap(String name)
Description copied from interface:RedissonReactiveClient
Returns map instance by name.- Specified by:
getMap
in interfaceRedissonReactiveClient
- Type Parameters:
K
- type of keysV
- type of values- Parameters:
name
- - name of object- Returns:
- Map object
-
getMap
public <K,V> RMapReactive<K,V> getMap(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns map instance by name using provided codec for both map keys and values.- Specified by:
getMap
in interfaceRedissonReactiveClient
- Type Parameters:
K
- type of keysV
- type of values- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- Map object
-
getSet
public <V> RSetReactive<V> getSet(String name)
Description copied from interface:RedissonReactiveClient
Returns set instance by name.- Specified by:
getSet
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- - name of object- Returns:
- Set object
-
getSet
public <V> RSetReactive<V> getSet(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns set instance by name using provided codec for set objects.- Specified by:
getSet
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- - name of setcodec
- - codec for values- Returns:
- Set object
-
getScoredSortedSet
public <V> RScoredSortedSetReactive<V> getScoredSortedSet(String name)
Description copied from interface:RedissonReactiveClient
Returns Redis Sorted Set instance by name. This sorted set sorts objects by object score.- Specified by:
getScoredSortedSet
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- of scored sorted set- Returns:
- ScoredSortedSet object
-
getScoredSortedSet
public <V> RScoredSortedSetReactive<V> getScoredSortedSet(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns Redis Sorted Set instance by name using provided codec for sorted set objects. This sorted set sorts objects by object score.- Specified by:
getScoredSortedSet
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- - name of scored sorted setcodec
- - codec for values- Returns:
- ScoredSortedSet object
-
getLexSortedSet
public RLexSortedSetReactive getLexSortedSet(String name)
Description copied from interface:RedissonReactiveClient
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 interfaceRedissonReactiveClient
- Parameters:
name
- - name of object- Returns:
- LexSortedSet object
-
getTopic
public RTopicReactive getTopic(String name)
Description copied from interface:RedissonReactiveClient
Returns topic instance by name.- Specified by:
getTopic
in interfaceRedissonReactiveClient
- Parameters:
name
- - name of object- Returns:
- Topic object
-
getTopic
public RTopicReactive getTopic(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns topic instance by name using provided codec for messages.- Specified by:
getTopic
in interfaceRedissonReactiveClient
- Parameters:
name
- - name of objectcodec
- - codec for message- Returns:
- Topic object
-
getReliableTopic
public RReliableTopicReactive getReliableTopic(String name)
Description copied from interface:RedissonReactiveClient
Returns reliable topic instance by name.Dedicated Redis connection is allocated per instance (subscriber) of this object. Messages are delivered to all listeners attached to the same Redis setup.
Requires Redis 5.0.0 and higher.
- Specified by:
getReliableTopic
in interfaceRedissonReactiveClient
- Parameters:
name
- - name of object- Returns:
- ReliableTopic object
-
getReliableTopic
public RReliableTopicReactive getReliableTopic(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns reliable topic instance by name using provided codec for messages.Dedicated Redis connection is allocated per instance (subscriber) of this object. Messages are delivered to all listeners attached to the same Redis setup.
Requires Redis 5.0.0 and higher.
- Specified by:
getReliableTopic
in interfaceRedissonReactiveClient
- Parameters:
name
- - name of objectcodec
- - codec for message- Returns:
- ReliableTopic object
-
getPatternTopic
public RPatternTopicReactive getPatternTopic(String pattern)
Description copied from interface:RedissonReactiveClient
Returns topic instance satisfies by pattern name. Supported glob-style patterns: h?llo subscribes to hello, hallo and hxllo h*llo subscribes to hllo and heeeello h[ae]llo subscribes to hello and hallo, but not hillo- Specified by:
getPatternTopic
in interfaceRedissonReactiveClient
- Parameters:
pattern
- of the topic- Returns:
- PatternTopic object
-
getPatternTopic
public RPatternTopicReactive getPatternTopic(String pattern, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns topic instance satisfies by pattern name using provided codec for messages. Supported glob-style patterns: h?llo subscribes to hello, hallo and hxllo h*llo subscribes to hllo and heeeello h[ae]llo subscribes to hello and hallo, but not hillo- Specified by:
getPatternTopic
in interfaceRedissonReactiveClient
- Parameters:
pattern
- of the topiccodec
- - codec for message- Returns:
- PatternTopic object
-
getQueue
public <V> RQueueReactive<V> getQueue(String name)
Description copied from interface:RedissonReactiveClient
Returns queue instance by name.- Specified by:
getQueue
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- - name of object- Returns:
- Queue object
-
getQueue
public <V> RQueueReactive<V> getQueue(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns queue instance by name using provided codec for queue objects.- Specified by:
getQueue
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- Queue object
-
getRingBuffer
public <V> RRingBufferReactive<V> getRingBuffer(String name)
Description copied from interface:RedissonReactiveClient
Returns RingBuffer based queue.- Specified by:
getRingBuffer
in interfaceRedissonReactiveClient
- Type Parameters:
V
- value type- Parameters:
name
- - name of object- Returns:
- RingBuffer object
-
getRingBuffer
public <V> RRingBufferReactive<V> getRingBuffer(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns RingBuffer based queue.- Specified by:
getRingBuffer
in interfaceRedissonReactiveClient
- Type Parameters:
V
- value type- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- RingBuffer object
-
getBlockingQueue
public <V> RBlockingQueueReactive<V> getBlockingQueue(String name)
Description copied from interface:RedissonReactiveClient
Returns blocking queue instance by name.- Specified by:
getBlockingQueue
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- - name of object- Returns:
- BlockingQueue object
-
getBlockingQueue
public <V> RBlockingQueueReactive<V> getBlockingQueue(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns blocking queue instance by name using provided codec for queue objects.- Specified by:
getBlockingQueue
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- - name of objectcodec
- - code for values- Returns:
- BlockingQueue object
-
getDeque
public <V> RDequeReactive<V> getDeque(String name)
Description copied from interface:RedissonReactiveClient
Returns deque instance by name.- Specified by:
getDeque
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- - name of object- Returns:
- Deque object
-
getDeque
public <V> RDequeReactive<V> getDeque(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns deque instance by name using provided codec for deque objects.- Specified by:
getDeque
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- - name of objectcodec
- - coded for values- Returns:
- Deque object
-
getTimeSeries
public <V> RTimeSeriesReactive<V> getTimeSeries(String name)
Description copied from interface:RedissonReactiveClient
Returns time-series instance byname
- Specified by:
getTimeSeries
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of value- Parameters:
name
- - name of instance- Returns:
- RTimeSeries object
-
getTimeSeries
public <V> RTimeSeriesReactive<V> getTimeSeries(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns time-series instance byname
using providedcodec
for values.- Specified by:
getTimeSeries
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of value- Parameters:
name
- - name of instancecodec
- - codec for values- Returns:
- RTimeSeries object
-
getSetCache
public <V> RSetCacheReactive<V> getSetCache(String name)
Description copied from interface:RedissonReactiveClient
Returns set-based cache instance byname
. Supports value eviction with a given TTL value.If eviction is not required then it's better to use regular map
RedissonReactiveClient.getSet(String, Codec)
.- Specified by:
getSetCache
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- - name of object- Returns:
- SetCache object
-
getSetCache
public <V> RSetCacheReactive<V> getSetCache(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns set-based cache instance byname
. Supports value eviction with a given TTL value.If eviction is not required then it's better to use regular map
RedissonReactiveClient.getSet(String, Codec)
.- Specified by:
getSetCache
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- SetCache object
-
getAtomicLong
public RAtomicLongReactive getAtomicLong(String name)
Description copied from interface:RedissonReactiveClient
Returns "atomic long" instance by name.- Specified by:
getAtomicLong
in interfaceRedissonReactiveClient
- Parameters:
name
- of the "atomic long"- Returns:
- AtomicLong object
-
getAtomicDouble
public RAtomicDoubleReactive getAtomicDouble(String name)
Description copied from interface:RedissonReactiveClient
Returns "atomic double" instance by name.- Specified by:
getAtomicDouble
in interfaceRedissonReactiveClient
- Parameters:
name
- of the "atomic double"- Returns:
- AtomicLong object
-
getRemoteService
public RRemoteService getRemoteService()
Description copied from interface:RedissonReactiveClient
Returns object for remote operations prefixed with the default name (redisson_remote_service)- Specified by:
getRemoteService
in interfaceRedissonReactiveClient
- Returns:
- RemoteService object
-
getRemoteService
public RRemoteService getRemoteService(String name)
Description copied from interface:RedissonReactiveClient
Returns object for remote operations prefixed with the specified name- Specified by:
getRemoteService
in interfaceRedissonReactiveClient
- Parameters:
name
- - the name used as the Redis key prefix for the services- Returns:
- RemoteService object
-
getRemoteService
public RRemoteService getRemoteService(Codec codec)
Description copied from interface:RedissonReactiveClient
Returns object for remote operations prefixed with the default name (redisson_remote_service) and uses provided codec for method arguments and result.- Specified by:
getRemoteService
in interfaceRedissonReactiveClient
- Parameters:
codec
- - codec for response and request- Returns:
- RemoteService object
-
getRemoteService
public RRemoteService getRemoteService(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns object for remote operations prefixed with the specified name and uses provided codec for method arguments and result.- Specified by:
getRemoteService
in interfaceRedissonReactiveClient
- Parameters:
name
- - the name used as the Redis key prefix for the servicescodec
- - codec for response and request- Returns:
- RemoteService object
-
getBitSet
public RBitSetReactive getBitSet(String name)
Description copied from interface:RedissonReactiveClient
Returns bitSet instance by name.- Specified by:
getBitSet
in interfaceRedissonReactiveClient
- Parameters:
name
- - name of object- Returns:
- BitSet object
-
getScript
public RScriptReactive getScript()
Description copied from interface:RedissonReactiveClient
Returns script operations object- Specified by:
getScript
in interfaceRedissonReactiveClient
- Returns:
- Script object
-
getScript
public RScriptReactive getScript(Codec codec)
Description copied from interface:RedissonReactiveClient
Returns script operations object using provided codec.- Specified by:
getScript
in interfaceRedissonReactiveClient
- Parameters:
codec
- - codec for params and result- Returns:
- Script object
-
createBatch
public RBatchReactive createBatch(BatchOptions options)
Description copied from interface:RedissonReactiveClient
Return batch object which executes group of command in pipeline. See http://redis.io/topics/pipelining- Specified by:
createBatch
in interfaceRedissonReactiveClient
- Parameters:
options
- - batch configuration- Returns:
- Batch object
-
createBatch
public RBatchReactive createBatch()
Description copied from interface:RedissonReactiveClient
Return batch object which executes group of command in pipeline. See http://redis.io/topics/pipelining- Specified by:
createBatch
in interfaceRedissonReactiveClient
- Returns:
- Batch object
-
getKeys
public RKeysReactive getKeys()
Description copied from interface:RedissonReactiveClient
Returns keys operations. Each of Redis/Redisson object associated with own key- Specified by:
getKeys
in interfaceRedissonReactiveClient
- Returns:
- Keys object
-
getConfig
public Config getConfig()
Description copied from interface:RedissonReactiveClient
Allows to get configuration provided during Redisson instance creation. Further changes on this object not affect Redisson instance.- Specified by:
getConfig
in interfaceRedissonReactiveClient
- Returns:
- Config object
-
getNodesGroup
public NodesGroup<Node> getNodesGroup()
Description copied from interface:RedissonReactiveClient
Get Redis nodes group for server operations- Specified by:
getNodesGroup
in interfaceRedissonReactiveClient
- Returns:
- NodesGroup object
-
getClusterNodesGroup
public NodesGroup<ClusterNode> getClusterNodesGroup()
Description copied from interface:RedissonReactiveClient
Get Redis cluster nodes group for server operations- Specified by:
getClusterNodesGroup
in interfaceRedissonReactiveClient
- Returns:
- NodesGroup object
-
shutdown
public void shutdown()
Description copied from interface:RedissonReactiveClient
Shuts down Redisson instance NOT Redis server- Specified by:
shutdown
in interfaceRedissonReactiveClient
-
isShutdown
public boolean isShutdown()
Description copied from interface:RedissonReactiveClient
Returnstrue
if this Redisson instance has been shut down.- Specified by:
isShutdown
in interfaceRedissonReactiveClient
- Returns:
true
if this Redisson instance has been shut down otherwisefalse
-
isShuttingDown
public boolean isShuttingDown()
Description copied from interface:RedissonReactiveClient
Returnstrue
if this Redisson instance was started to be shutdown or was shutdownRedissonReactiveClient.isShutdown()
already.- Specified by:
isShuttingDown
in interfaceRedissonReactiveClient
- Returns:
true
if this Redisson instance was started to be shutdown or was shutdownRedissonReactiveClient.isShutdown()
already otherwisefalse
-
getMapCache
public <K,V> RMapCacheReactive<K,V> getMapCache(String name, Codec codec, MapOptions<K,V> options)
Description copied from interface:RedissonReactiveClient
Returns map-based cache instance byname
using providedcodec
for both cache keys and values. Supports entry eviction with a given MaxIdleTime and TTL settings.If eviction is not required then it's better to use regular map
RedissonReactiveClient.getMap(String, Codec, MapOptions)
.- Specified by:
getMapCache
in interfaceRedissonReactiveClient
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - object namecodec
- - codec for keys and valuesoptions
- - map options- Returns:
- MapCache object
-
getMapCache
public <K,V> RMapCacheReactive<K,V> getMapCache(String name, MapOptions<K,V> options)
Description copied from interface:RedissonReactiveClient
Returns map-based cache instance by name. Supports entry eviction with a given MaxIdleTime and TTL settings.If eviction is not required then it's better to use regular map
RedissonReactiveClient.getMap(String, MapOptions)
.- Specified by:
getMapCache
in interfaceRedissonReactiveClient
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectoptions
- - map options- Returns:
- MapCache object
-
getMap
public <K,V> RMapReactive<K,V> getMap(String name, MapOptions<K,V> options)
Description copied from interface:RedissonReactiveClient
Returns map instance by name.- Specified by:
getMap
in interfaceRedissonReactiveClient
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectoptions
- - map options- Returns:
- Map object
-
getMap
public <K,V> RMapReactive<K,V> getMap(String name, Codec codec, MapOptions<K,V> options)
Description copied from interface:RedissonReactiveClient
Returns map instance by name using provided codec for both map keys and values.- Specified by:
getMap
in interfaceRedissonReactiveClient
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and valuesoptions
- - map options- Returns:
- Map object
-
createTransaction
public RTransactionReactive createTransaction(TransactionOptions options)
Description copied from interface:RedissonReactiveClient
Creates transaction with READ_COMMITTED isolation level.- Specified by:
createTransaction
in interfaceRedissonReactiveClient
- Parameters:
options
- - transaction configuration- Returns:
- Transaction object
-
getBlockingDeque
public <V> RBlockingDequeReactive<V> getBlockingDeque(String name)
Description copied from interface:RedissonReactiveClient
Returns unbounded blocking deque instance by name.- Specified by:
getBlockingDeque
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- BlockingDeque object
-
getBlockingDeque
public <V> RBlockingDequeReactive<V> getBlockingDeque(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns unbounded blocking deque instance by name using provided codec for deque objects.- Specified by:
getBlockingDeque
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - deque objects codec- Returns:
- BlockingDeque object
-
getTransferQueue
public <V> RTransferQueueReactive<V> getTransferQueue(String name)
Description copied from interface:RedissonReactiveClient
Returns transfer queue instance by name.- Specified by:
getTransferQueue
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- - name of object- Returns:
- TransferQueue object
-
getTransferQueue
public <V> RTransferQueueReactive<V> getTransferQueue(String name, Codec codec)
Description copied from interface:RedissonReactiveClient
Returns transfer queue instance by name using provided codec for queue objects.- Specified by:
getTransferQueue
in interfaceRedissonReactiveClient
- Type Parameters:
V
- type of values- Parameters:
name
- - name of objectcodec
- - code for values- Returns:
- TransferQueue object
-
getId
public String getId()
Description copied from interface:RedissonReactiveClient
Returns id of this Redisson instance- Specified by:
getId
in interfaceRedissonReactiveClient
- Returns:
- id
-
-