Class RedissonRx
- java.lang.Object
-
- org.redisson.RedissonRx
-
- All Implemented Interfaces:
RedissonRxClient
public class RedissonRx extends Object implements RedissonRxClient
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 CommandRxExecutorcommandExecutorprotected ConnectionManagerconnectionManagerprotected EvictionSchedulerevictionSchedulerprotected ConcurrentMap<String,ResponseEntry>responsesprotected WriteBehindServicewriteBehindService
-
Constructor Summary
Constructors Modifier Constructor Description protectedRedissonRx(Config config)protectedRedissonRx(ConnectionManager connectionManager, EvictionScheduler evictionScheduler, WriteBehindService writeBehindService, ConcurrentMap<String,ResponseEntry> responses)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RBatchRxcreateBatch()Return batch object which executes group of command in pipeline.RBatchRxcreateBatch(BatchOptions options)Return batch object which executes group of command in pipeline.RTransactionRxcreateTransaction(TransactionOptions options)Creates transaction with READ_COMMITTED isolation level.RAtomicDoubleRxgetAtomicDouble(String name)Returns "atomic double" instance by name.RAtomicLongRxgetAtomicLong(String name)Returns "atomic long" instance by name.RBinaryStreamRxgetBinaryStream(String name)Returns binary stream holder instance bynameRBitSetRxgetBitSet(String name)Returns bitSet instance by name.<V> RBlockingDequeRx<V>getBlockingDeque(String name)Returns unbounded blocking deque instance by name.<V> RBlockingDequeRx<V>getBlockingDeque(String name, Codec codec)Returns unbounded blocking deque instance by name using provided codec for deque objects.<V> RBlockingQueueRx<V>getBlockingQueue(String name)Returns blocking queue instance by name.<V> RBlockingQueueRx<V>getBlockingQueue(String name, Codec codec)Returns blocking queue instance by name using provided codec for queue objects.<V> RBucketRx<V>getBucket(String name)Returns object holder instance by name<V> RBucketRx<V>getBucket(String name, Codec codec)Returns object holder instance by name using provided codec for object.RBucketsRxgetBuckets()Returns interface for mass operations with Bucket objects.RBucketsRxgetBuckets(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 operationsCommandRxExecutorgetCommandExecutor()ConfiggetConfig()Allows to get configuration provided during Redisson instance creation.RCountDownLatchRxgetCountDownLatch(String name)Returns CountDownLatch instance by name.<V> RDequeRx<V>getDeque(String name)Returns deque instance by name.<V> RDequeRx<V>getDeque(String name, Codec codec)Returns deque instance by name using provided codec for deque objects.RLockRxgetFairLock(String name)Returns Lock instance by name.<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 bynameusing provided codec for geospatial members.<V> RHyperLogLogRx<V>getHyperLogLog(String name)Returns HyperLogLog instance by name.<V> RHyperLogLogRx<V>getHyperLogLog(String name, Codec codec)Returns HyperLogLog instance by name using provided codec for hll objects.StringgetId()Returns id of this Redisson instanceRIdGeneratorRxgetIdGenerator(String name)Returns id generator by name.RKeysRxgetKeys()Returns keys operations.RLexSortedSetRxgetLexSortedSet(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)Returns list instance by name using provided codec for list objects.<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.RLockRxgetLock(String name)Returns Lock instance by name.<K,V>
RMapRx<K,V>getMap(String name)Returns map instance by name.<K,V>
RMapRx<K,V>getMap(String name, MapOptions<K,V> options)Returns map instance by name.<K,V>
RMapRx<K,V>getMap(String name, Codec codec)Returns map instance by name using provided codec for both map keys and values.<K,V>
RMapRx<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>
RMapCacheRx<K,V>getMapCache(String name)Returns map-based cache instance by name.<K,V>
RMapCacheRx<K,V>getMapCache(String name, MapOptions<K,V> options)Returns map-based cache instance by name.<K,V>
RMapCacheRx<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>
RMapCacheRx<K,V>getMapCache(String name, Codec codec, MapOptions<K,V> options)Returns map-based cache instance bynameusing providedcodecfor both cache keys and values.RLockRxgetMultiLock(RLock... locks)Returns MultiLock instance associated with specifiedlocksNodesGroup<Node>getNodesGroup()Get Redis nodes group for server operationsRPatternTopicRxgetPatternTopic(String pattern)Returns topic instance satisfies by pattern name.RPatternTopicRxgetPatternTopic(String pattern, Codec codec)Returns topic instance satisfies by pattern name using provided codec for messages.RPermitExpirableSemaphoreRxgetPermitExpirableSemaphore(String name)Returns semaphore instance by name.<V> RQueueRx<V>getQueue(String name)Returns queue instance by name.<V> RQueueRx<V>getQueue(String name, Codec codec)Returns queue instance by name using provided codec for queue objects.RRateLimiterRxgetRateLimiter(String name)Returns rate limiter instance bynameRReadWriteLockRxgetReadWriteLock(String name)Returns ReadWriteLock instance by name.RLockRxgetRedLock(RLock... locks)RReliableTopicRxgetReliableTopic(String name)Returns reliable topic instance by name.RReliableTopicRxgetReliableTopic(String name, Codec codec)Returns reliable topic instance by name using provided codec for messages.RRemoteServicegetRemoteService()Returns object for remote operations prefixed with the default name (redisson_remote_service)RRemoteServicegetRemoteService(String name)Returns object for remote operations prefixed with the specified nameRRemoteServicegetRemoteService(String name, Codec codec)Returns object for remote operations prefixed with the specified name and uses provided codec for method arguments and result.RRemoteServicegetRemoteService(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> RRingBufferRx<V>getRingBuffer(String name)Returns RingBuffer based queue.<V> RRingBufferRx<V>getRingBuffer(String name, Codec codec)Returns RingBuffer based queue.<V> RScoredSortedSetRx<V>getScoredSortedSet(String name)Returns Redis Sorted Set instance by name.<V> RScoredSortedSetRx<V>getScoredSortedSet(String name, Codec codec)Returns Redis Sorted Set instance by name using provided codec for sorted set objects.RScriptRxgetScript()Returns script operations objectRScriptRxgetScript(Codec codec)Returns script operations object using provided codec.RSemaphoreRxgetSemaphore(String name)Returns semaphore instance by name<V> RSetRx<V>getSet(String name)Returns set instance by name.<V> RSetRx<V>getSet(String name, Codec codec)Returns set instance by name using provided codec for set objects.<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.<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.RLockRxgetSpinLock(String name)Returns Spin lock instance by name.RLockRxgetSpinLock(String name, LockOptions.BackOff backOff)Returns Spin lock instance by name with specified back off options.<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 bynameusing providedcodecfor entries.<V> RTimeSeriesRx<V>getTimeSeries(String name)Returns time-series instance byname<V> RTimeSeriesRx<V>getTimeSeries(String name, Codec codec)Returns time-series instance bynameusing providedcodecfor values.RTopicRxgetTopic(String name)Returns topic instance by name.RTopicRxgetTopic(String name, Codec codec)Returns topic instance by name using provided codec for messages.<V> RTransferQueueRx<V>getTransferQueue(String name)Returns transfer queue instance by name.<V> RTransferQueueRx<V>getTransferQueue(String name, Codec codec)Returns transfer queue instance by name using provided codec for queue objects.booleanisShutdown()Returnstrueif this Redisson instance has been shut down.booleanisShuttingDown()Returnstrueif this Redisson instance was started to be shutdown or was shutdownRedissonRxClient.isShutdown()already.voidshutdown()Shuts down Redisson instance NOT Redis server
-
-
-
Field Detail
-
writeBehindService
protected final WriteBehindService writeBehindService
-
evictionScheduler
protected final EvictionScheduler evictionScheduler
-
commandExecutor
protected final CommandRxExecutor commandExecutor
-
connectionManager
protected final ConnectionManager connectionManager
-
responses
protected final ConcurrentMap<String,ResponseEntry> responses
-
-
Constructor Detail
-
RedissonRx
protected RedissonRx(Config config)
-
RedissonRx
protected RedissonRx(ConnectionManager connectionManager, EvictionScheduler evictionScheduler, WriteBehindService writeBehindService, ConcurrentMap<String,ResponseEntry> responses)
-
-
Method Detail
-
getCommandExecutor
public CommandRxExecutor getCommandExecutor()
-
getStream
public <K,V> RStreamRx<K,V> getStream(String name)
Description copied from interface:RedissonRxClientReturns stream instance bynameRequires Redis 5.0.0 and higher.
- Specified by:
getStreamin interfaceRedissonRxClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- of stream- Returns:
- RStream object
-
getStream
public <K,V> RStreamRx<K,V> getStream(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns stream instance bynameusing providedcodecfor entries.Requires Redis 5.0.0 and higher.
- Specified by:
getStreamin interfaceRedissonRxClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of streamcodec- - codec for entry- Returns:
- RStream object
-
getGeo
public <V> RGeoRx<V> getGeo(String name)
Description copied from interface:RedissonRxClientReturns geospatial items holder instance byname.- Specified by:
getGeoin interfaceRedissonRxClient- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- Geo object
-
getGeo
public <V> RGeoRx<V> getGeo(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns geospatial items holder instance bynameusing provided codec for geospatial members.- Specified by:
getGeoin interfaceRedissonRxClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for value- Returns:
- Geo object
-
getFairLock
public RLockRx getFairLock(String name)
Description copied from interface:RedissonRxClientReturns 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:
getFairLockin interfaceRedissonRxClient- Parameters:
name- - name of object- Returns:
- Lock object
-
getRateLimiter
public RRateLimiterRx getRateLimiter(String name)
Description copied from interface:RedissonRxClientReturns rate limiter instance byname- Specified by:
getRateLimiterin interfaceRedissonRxClient- Parameters:
name- of rate limiter- Returns:
- RateLimiter object
-
getBinaryStream
public RBinaryStreamRx getBinaryStream(String name)
Description copied from interface:RedissonRxClientReturns binary stream holder instance byname- Specified by:
getBinaryStreamin interfaceRedissonRxClient- Parameters:
name- of binary stream- Returns:
- BinaryStream object
-
getSemaphore
public RSemaphoreRx getSemaphore(String name)
Description copied from interface:RedissonRxClientReturns semaphore instance by name- Specified by:
getSemaphorein interfaceRedissonRxClient- Parameters:
name- - name of object- Returns:
- Semaphore object
-
getPermitExpirableSemaphore
public RPermitExpirableSemaphoreRx getPermitExpirableSemaphore(String name)
Description copied from interface:RedissonRxClientReturns semaphore instance by name. Supports lease time parameter for each acquired permit.- Specified by:
getPermitExpirableSemaphorein interfaceRedissonRxClient- Parameters:
name- - name of object- Returns:
- PermitExpirableSemaphore object
-
getReadWriteLock
public RReadWriteLockRx getReadWriteLock(String name)
Description copied from interface:RedissonRxClientReturns ReadWriteLock instance by name.To increase reliability during failover, all operations wait for propagation to all Redis slaves.
- Specified by:
getReadWriteLockin interfaceRedissonRxClient- Parameters:
name- - name of object- Returns:
- Lock object
-
getLock
public RLockRx getLock(String name)
Description copied from interface:RedissonRxClientReturns 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:
getLockin interfaceRedissonRxClient- Parameters:
name- - name of object- Returns:
- Lock object
-
getSpinLock
public RLockRx getSpinLock(String name)
Description copied from interface:RedissonRxClientReturns 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:
getSpinLockin interfaceRedissonRxClient- Parameters:
name- - name of object- Returns:
- Lock object
-
getSpinLock
public RLockRx getSpinLock(String name, LockOptions.BackOff backOff)
Description copied from interface:RedissonRxClientReturns 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:
getSpinLockin interfaceRedissonRxClient- Parameters:
name- - name of object- Returns:
- Lock object
-
getMultiLock
public RLockRx getMultiLock(RLock... locks)
Description copied from interface:RedissonRxClientReturns MultiLock instance associated with specifiedlocks- Specified by:
getMultiLockin interfaceRedissonRxClient- Parameters:
locks- - collection of locks- Returns:
- MultiLock object
-
getRedLock
public RLockRx getRedLock(RLock... locks)
- Specified by:
getRedLockin interfaceRedissonRxClient
-
getCountDownLatch
public RCountDownLatchRx getCountDownLatch(String name)
Description copied from interface:RedissonRxClientReturns CountDownLatch instance by name.- Specified by:
getCountDownLatchin interfaceRedissonRxClient- Parameters:
name- - name of object- Returns:
- CountDownLatch object
-
getMapCache
public <K,V> RMapCacheRx<K,V> getMapCache(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns 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
RedissonRxClient.getMap(String, Codec).- Specified by:
getMapCachein interfaceRedissonRxClient- Type Parameters:
K- type of keysV- type of values- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- MapCache object
-
getMapCache
public <K,V> RMapCacheRx<K,V> getMapCache(String name)
Description copied from interface:RedissonRxClientReturns 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
RedissonRxClient.getMap(String).- Specified by:
getMapCachein interfaceRedissonRxClient- Type Parameters:
K- type of keysV- type of values- Parameters:
name- - name of object- Returns:
- MapCache object
-
getBucket
public <V> RBucketRx<V> getBucket(String name)
Description copied from interface:RedissonRxClientReturns object holder instance by name- Specified by:
getBucketin interfaceRedissonRxClient- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- Bucket object
-
getBucket
public <V> RBucketRx<V> getBucket(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns object holder instance by name using provided codec for object.- Specified by:
getBucketin interfaceRedissonRxClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for value- Returns:
- Bucket object
-
getBuckets
public RBucketsRx getBuckets()
Description copied from interface:RedissonRxClientReturns interface for mass operations with Bucket objects.- Specified by:
getBucketsin interfaceRedissonRxClient- Returns:
- Buckets
-
getBuckets
public RBucketsRx getBuckets(Codec codec)
Description copied from interface:RedissonRxClientReturns interface for mass operations with Bucket objects using provided codec for object.- Specified by:
getBucketsin interfaceRedissonRxClient- Parameters:
codec- - codec for bucket objects- Returns:
- Buckets
-
getHyperLogLog
public <V> RHyperLogLogRx<V> getHyperLogLog(String name)
Description copied from interface:RedissonRxClientReturns HyperLogLog instance by name.- Specified by:
getHyperLogLogin interfaceRedissonRxClient- Type Parameters:
V- type of values- Parameters:
name- - name of object- Returns:
- HyperLogLog object
-
getHyperLogLog
public <V> RHyperLogLogRx<V> getHyperLogLog(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns HyperLogLog instance by name using provided codec for hll objects.- Specified by:
getHyperLogLogin interfaceRedissonRxClient- Type Parameters:
V- type of values- Parameters:
name- - name of objectcodec- - codec of values- Returns:
- HyperLogLog object
-
getIdGenerator
public RIdGeneratorRx getIdGenerator(String name)
Description copied from interface:RedissonRxClientReturns id generator by name.- Specified by:
getIdGeneratorin interfaceRedissonRxClient- Parameters:
name- - name of object- Returns:
- IdGenerator object
-
getList
public <V> RListRx<V> getList(String name)
Description copied from interface:RedissonRxClientReturns list instance by name.- Specified by:
getListin interfaceRedissonRxClient- Type Parameters:
V- type of values- Parameters:
name- - name of object- Returns:
- List object
-
getList
public <V> RListRx<V> getList(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns list instance by name using provided codec for list objects.- Specified by:
getListin interfaceRedissonRxClient- Type Parameters:
V- type of values- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- List object
-
getListMultimap
public <K,V> RListMultimapRx<K,V> getListMultimap(String name)
Description copied from interface:RedissonRxClientReturns List based Multimap instance by name.- Specified by:
getListMultimapin interfaceRedissonRxClient- 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:RedissonRxClientReturns List based Multimap instance by name using provided codec for both map keys and values.- Specified by:
getListMultimapin interfaceRedissonRxClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - codec for keys and values- Returns:
- RListMultimapReactive object
-
getListMultimapCache
public <K,V> RListMultimapCacheRx<K,V> getListMultimapCache(String name)
Description copied from interface:RedissonRxClientReturns 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 multimapRedissonRxClient.getListMultimap(String).- Specified by:
getListMultimapCachein interfaceRedissonRxClient- 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:RedissonRxClientReturns 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 multimapRedissonRxClient.getListMultimap(String, Codec).- Specified by:
getListMultimapCachein interfaceRedissonRxClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - codec for keys and values- Returns:
- RListMultimapCacheRx object
-
getSetMultimap
public <K,V> RSetMultimapRx<K,V> getSetMultimap(String name)
Description copied from interface:RedissonRxClientReturns Set based Multimap instance by name.- Specified by:
getSetMultimapin interfaceRedissonRxClient- 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:RedissonRxClientReturns Set based Multimap instance by name using provided codec for both map keys and values.- Specified by:
getSetMultimapin interfaceRedissonRxClient- 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:RedissonRxClientReturns 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 multimapRedissonRxClient.getSetMultimap(String).- Specified by:
getSetMultimapCachein interfaceRedissonRxClient- 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:RedissonRxClientReturns 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 multimapRedissonRxClient.getSetMultimap(String, Codec).- Specified by:
getSetMultimapCachein interfaceRedissonRxClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - codec for keys and values- Returns:
- RSetMultimapCacheRx object
-
getMap
public <K,V> RMapRx<K,V> getMap(String name)
Description copied from interface:RedissonRxClientReturns map instance by name.- Specified by:
getMapin interfaceRedissonRxClient- Type Parameters:
K- type of keysV- type of values- Parameters:
name- - name of object- Returns:
- Map object
-
getMap
public <K,V> RMapRx<K,V> getMap(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns map instance by name using provided codec for both map keys and values.- Specified by:
getMapin interfaceRedissonRxClient- 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> RSetRx<V> getSet(String name)
Description copied from interface:RedissonRxClientReturns set instance by name.- Specified by:
getSetin interfaceRedissonRxClient- Type Parameters:
V- type of values- Parameters:
name- - name of object- Returns:
- Set object
-
getSet
public <V> RSetRx<V> getSet(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns set instance by name using provided codec for set objects.- Specified by:
getSetin interfaceRedissonRxClient- Type Parameters:
V- type of values- Parameters:
name- - name of setcodec- - codec for values- Returns:
- Set object
-
getScoredSortedSet
public <V> RScoredSortedSetRx<V> getScoredSortedSet(String name)
Description copied from interface:RedissonRxClientReturns Redis Sorted Set instance by name. This sorted set sorts objects by object score.- Specified by:
getScoredSortedSetin interfaceRedissonRxClient- Type Parameters:
V- type of values- Parameters:
name- of scored sorted set- Returns:
- ScoredSortedSet object
-
getScoredSortedSet
public <V> RScoredSortedSetRx<V> getScoredSortedSet(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns Redis Sorted Set instance by name using provided codec for sorted set objects. This sorted set sorts objects by object score.- Specified by:
getScoredSortedSetin interfaceRedissonRxClient- Type Parameters:
V- type of values- Parameters:
name- - name of scored sorted setcodec- - codec for values- Returns:
- ScoredSortedSet object
-
getLexSortedSet
public RLexSortedSetRx getLexSortedSet(String name)
Description copied from interface:RedissonRxClientReturns 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 interfaceRedissonRxClient- Parameters:
name- - name of object- Returns:
- LexSortedSet object
-
getTopic
public RTopicRx getTopic(String name)
Description copied from interface:RedissonRxClientReturns topic instance by name.- Specified by:
getTopicin interfaceRedissonRxClient- Parameters:
name- - name of object- Returns:
- Topic object
-
getTopic
public RTopicRx getTopic(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns topic instance by name using provided codec for messages.- Specified by:
getTopicin interfaceRedissonRxClient- Parameters:
name- - name of objectcodec- - codec for message- Returns:
- Topic object
-
getReliableTopic
public RReliableTopicRx getReliableTopic(String name)
Description copied from interface:RedissonRxClientReturns 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:
getReliableTopicin interfaceRedissonRxClient- Parameters:
name- - name of object- Returns:
- ReliableTopic object
-
getReliableTopic
public RReliableTopicRx getReliableTopic(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns 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:
getReliableTopicin interfaceRedissonRxClient- Parameters:
name- - name of objectcodec- - codec for message- Returns:
- ReliableTopic object
-
getPatternTopic
public RPatternTopicRx getPatternTopic(String pattern)
Description copied from interface:RedissonRxClientReturns 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:
getPatternTopicin interfaceRedissonRxClient- Parameters:
pattern- of the topic- Returns:
- PatternTopic object
-
getPatternTopic
public RPatternTopicRx getPatternTopic(String pattern, Codec codec)
Description copied from interface:RedissonRxClientReturns 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:
getPatternTopicin interfaceRedissonRxClient- Parameters:
pattern- of the topiccodec- - codec for message- Returns:
- PatternTopic object
-
getQueue
public <V> RQueueRx<V> getQueue(String name)
Description copied from interface:RedissonRxClientReturns queue instance by name.- Specified by:
getQueuein interfaceRedissonRxClient- Type Parameters:
V- type of values- Parameters:
name- - name of object- Returns:
- Queue object
-
getQueue
public <V> RQueueRx<V> getQueue(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns queue instance by name using provided codec for queue objects.- Specified by:
getQueuein interfaceRedissonRxClient- Type Parameters:
V- type of values- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- Queue object
-
getRingBuffer
public <V> RRingBufferRx<V> getRingBuffer(String name)
Description copied from interface:RedissonRxClientReturns RingBuffer based queue.- Specified by:
getRingBufferin interfaceRedissonRxClient- Type Parameters:
V- value type- Parameters:
name- - name of object- Returns:
- RingBuffer object
-
getRingBuffer
public <V> RRingBufferRx<V> getRingBuffer(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns RingBuffer based queue.- Specified by:
getRingBufferin interfaceRedissonRxClient- Type Parameters:
V- value type- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- RingBuffer object
-
getBlockingQueue
public <V> RBlockingQueueRx<V> getBlockingQueue(String name)
Description copied from interface:RedissonRxClientReturns blocking queue instance by name.- Specified by:
getBlockingQueuein interfaceRedissonRxClient- Type Parameters:
V- type of values- Parameters:
name- - name of object- Returns:
- BlockingQueue object
-
getBlockingQueue
public <V> RBlockingQueueRx<V> getBlockingQueue(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns blocking queue instance by name using provided codec for queue objects.- Specified by:
getBlockingQueuein interfaceRedissonRxClient- Type Parameters:
V- type of values- Parameters:
name- - name of objectcodec- - code for values- Returns:
- BlockingQueue object
-
getDeque
public <V> RDequeRx<V> getDeque(String name)
Description copied from interface:RedissonRxClientReturns deque instance by name.- Specified by:
getDequein interfaceRedissonRxClient- Type Parameters:
V- type of values- Parameters:
name- - name of object- Returns:
- Deque object
-
getDeque
public <V> RDequeRx<V> getDeque(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns deque instance by name using provided codec for deque objects.- Specified by:
getDequein interfaceRedissonRxClient- Type Parameters:
V- type of values- Parameters:
name- - name of objectcodec- - coded for values- Returns:
- Deque object
-
getTimeSeries
public <V> RTimeSeriesRx<V> getTimeSeries(String name)
Description copied from interface:RedissonRxClientReturns time-series instance byname- Specified by:
getTimeSeriesin interfaceRedissonRxClient- Type Parameters:
V- type of value- Parameters:
name- - name of instance- Returns:
- RTimeSeries object
-
getTimeSeries
public <V> RTimeSeriesRx<V> getTimeSeries(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns time-series instance bynameusing providedcodecfor values.- Specified by:
getTimeSeriesin interfaceRedissonRxClient- Type Parameters:
V- type of value- Parameters:
name- - name of instancecodec- - codec for values- Returns:
- RTimeSeries object
-
getSetCache
public <V> RSetCacheRx<V> getSetCache(String name)
Description copied from interface:RedissonRxClientReturns 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
RedissonRxClient.getSet(String, Codec).- Specified by:
getSetCachein interfaceRedissonRxClient- Type Parameters:
V- type of values- Parameters:
name- - name of object- Returns:
- SetCache object
-
getSetCache
public <V> RSetCacheRx<V> getSetCache(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns 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
RedissonRxClient.getSet(String, Codec).- Specified by:
getSetCachein interfaceRedissonRxClient- Type Parameters:
V- type of values- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- SetCache object
-
getAtomicLong
public RAtomicLongRx getAtomicLong(String name)
Description copied from interface:RedissonRxClientReturns "atomic long" instance by name.- Specified by:
getAtomicLongin interfaceRedissonRxClient- Parameters:
name- of the "atomic long"- Returns:
- AtomicLong object
-
getAtomicDouble
public RAtomicDoubleRx getAtomicDouble(String name)
Description copied from interface:RedissonRxClientReturns "atomic double" instance by name.- Specified by:
getAtomicDoublein interfaceRedissonRxClient- Parameters:
name- of the "atomic double"- Returns:
- AtomicLong object
-
getRemoteService
public RRemoteService getRemoteService()
Description copied from interface:RedissonRxClientReturns object for remote operations prefixed with the default name (redisson_remote_service)- Specified by:
getRemoteServicein interfaceRedissonRxClient- Returns:
- RemoteService object
-
getRemoteService
public RRemoteService getRemoteService(String name)
Description copied from interface:RedissonRxClientReturns object for remote operations prefixed with the specified name- Specified by:
getRemoteServicein interfaceRedissonRxClient- 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:RedissonRxClientReturns object for remote operations prefixed with the default name (redisson_remote_service) and uses provided codec for method arguments and result.- Specified by:
getRemoteServicein interfaceRedissonRxClient- Parameters:
codec- - codec for response and request- Returns:
- RemoteService object
-
getRemoteService
public RRemoteService getRemoteService(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns object for remote operations prefixed with the specified name and uses provided codec for method arguments and result.- Specified by:
getRemoteServicein interfaceRedissonRxClient- Parameters:
name- - the name used as the Redis key prefix for the servicescodec- - codec for response and request- Returns:
- RemoteService object
-
getBitSet
public RBitSetRx getBitSet(String name)
Description copied from interface:RedissonRxClientReturns bitSet instance by name.- Specified by:
getBitSetin interfaceRedissonRxClient- Parameters:
name- - name of object- Returns:
- BitSet object
-
getScript
public RScriptRx getScript()
Description copied from interface:RedissonRxClientReturns script operations object- Specified by:
getScriptin interfaceRedissonRxClient- Returns:
- Script object
-
getScript
public RScriptRx getScript(Codec codec)
Description copied from interface:RedissonRxClientReturns script operations object using provided codec.- Specified by:
getScriptin interfaceRedissonRxClient- Parameters:
codec- - codec for params and result- Returns:
- Script object
-
createBatch
public RBatchRx createBatch()
Description copied from interface:RedissonRxClientReturn batch object which executes group of command in pipeline. See http://redis.io/topics/pipelining- Specified by:
createBatchin interfaceRedissonRxClient- Returns:
- Batch object
-
createBatch
public RBatchRx createBatch(BatchOptions options)
Description copied from interface:RedissonRxClientReturn batch object which executes group of command in pipeline. See http://redis.io/topics/pipelining- Specified by:
createBatchin interfaceRedissonRxClient- Parameters:
options- - batch configuration- Returns:
- Batch object
-
getKeys
public RKeysRx getKeys()
Description copied from interface:RedissonRxClientReturns keys operations. Each of Redis/Redisson object associated with own key- Specified by:
getKeysin interfaceRedissonRxClient- Returns:
- Keys object
-
getConfig
public Config getConfig()
Description copied from interface:RedissonRxClientAllows to get configuration provided during Redisson instance creation. Further changes on this object not affect Redisson instance.- Specified by:
getConfigin interfaceRedissonRxClient- Returns:
- Config object
-
getNodesGroup
public NodesGroup<Node> getNodesGroup()
Description copied from interface:RedissonRxClientGet Redis nodes group for server operations- Specified by:
getNodesGroupin interfaceRedissonRxClient- Returns:
- NodesGroup object
-
getClusterNodesGroup
public NodesGroup<ClusterNode> getClusterNodesGroup()
Description copied from interface:RedissonRxClientGet Redis cluster nodes group for server operations- Specified by:
getClusterNodesGroupin interfaceRedissonRxClient- Returns:
- NodesGroup object
-
shutdown
public void shutdown()
Description copied from interface:RedissonRxClientShuts down Redisson instance NOT Redis server- Specified by:
shutdownin interfaceRedissonRxClient
-
isShutdown
public boolean isShutdown()
Description copied from interface:RedissonRxClientReturnstrueif this Redisson instance has been shut down.- Specified by:
isShutdownin interfaceRedissonRxClient- Returns:
trueif this Redisson instance has been shut down otherwisefalse
-
isShuttingDown
public boolean isShuttingDown()
Description copied from interface:RedissonRxClientReturnstrueif this Redisson instance was started to be shutdown or was shutdownRedissonRxClient.isShutdown()already.- Specified by:
isShuttingDownin interfaceRedissonRxClient- Returns:
trueif this Redisson instance was started to be shutdown or was shutdownRedissonRxClient.isShutdown()already otherwisefalse
-
getMapCache
public <K,V> RMapCacheRx<K,V> getMapCache(String name, Codec codec, MapOptions<K,V> options)
Description copied from interface:RedissonRxClientReturns map-based cache instance bynameusing providedcodecfor 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
RedissonRxClient.getMap(String, Codec, MapOptions).- Specified by:
getMapCachein interfaceRedissonRxClient- 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> RMapCacheRx<K,V> getMapCache(String name, MapOptions<K,V> options)
Description copied from interface:RedissonRxClientReturns 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
RedissonRxClient.getMap(String, MapOptions).- Specified by:
getMapCachein interfaceRedissonRxClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectoptions- - map options- Returns:
- MapCache object
-
getMap
public <K,V> RMapRx<K,V> getMap(String name, MapOptions<K,V> options)
Description copied from interface:RedissonRxClientReturns map instance by name.- Specified by:
getMapin interfaceRedissonRxClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectoptions- - map options- Returns:
- Map object
-
getMap
public <K,V> RMapRx<K,V> getMap(String name, Codec codec, MapOptions<K,V> options)
Description copied from interface:RedissonRxClientReturns map instance by name using provided codec for both map keys and values.- Specified by:
getMapin interfaceRedissonRxClient- 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 RTransactionRx createTransaction(TransactionOptions options)
Description copied from interface:RedissonRxClientCreates transaction with READ_COMMITTED isolation level.- Specified by:
createTransactionin interfaceRedissonRxClient- Parameters:
options- - transaction configuration- Returns:
- Transaction object
-
getBlockingDeque
public <V> RBlockingDequeRx<V> getBlockingDeque(String name)
Description copied from interface:RedissonRxClientReturns unbounded blocking deque instance by name.- Specified by:
getBlockingDequein interfaceRedissonRxClient- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- BlockingDeque object
-
getBlockingDeque
public <V> RBlockingDequeRx<V> getBlockingDeque(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns unbounded blocking deque instance by name using provided codec for deque objects.- Specified by:
getBlockingDequein interfaceRedissonRxClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - deque objects codec- Returns:
- BlockingDeque object
-
getTransferQueue
public <V> RTransferQueueRx<V> getTransferQueue(String name)
Description copied from interface:RedissonRxClientReturns transfer queue instance by name.- Specified by:
getTransferQueuein interfaceRedissonRxClient- Type Parameters:
V- type of values- Parameters:
name- - name of object- Returns:
- TransferQueue object
-
getTransferQueue
public <V> RTransferQueueRx<V> getTransferQueue(String name, Codec codec)
Description copied from interface:RedissonRxClientReturns transfer queue instance by name using provided codec for queue objects.- Specified by:
getTransferQueuein interfaceRedissonRxClient- 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:RedissonRxClientReturns id of this Redisson instance- Specified by:
getIdin interfaceRedissonRxClient- Returns:
- id
-
-