Interface RedissonClient
-
- All Known Implementing Classes:
Redisson
public interface RedissonClient
Main Redisson interface for access to all redisson objects with sync/async interface.- Author:
- Nikita Koksharov
- See Also:
RedissonReactiveClient
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description RBatch
createBatch()
Deprecated.RBatch
createBatch(BatchOptions options)
Creates batch object which could be executed later with collected group of commands in pipeline mode.RTransaction
createTransaction(TransactionOptions options)
Creates transaction with READ_COMMITTED isolation level.RAtomicDouble
getAtomicDouble(String name)
Returns atomicDouble instance by name.RAtomicLong
getAtomicLong(String name)
Returns atomicLong instance by name.RBinaryStream
getBinaryStream(String name)
Returns binary stream holder instance byname
RBitSet
getBitSet(String name)
Returns bitSet instance by name.<V> RBlockingDeque<V>
getBlockingDeque(String name)
Returns unbounded blocking deque instance by name.<V> RBlockingDeque<V>
getBlockingDeque(String name, Codec codec)
Returns unbounded blocking deque instance by name using provided codec for deque objects.<V> RBlockingQueue<V>
getBlockingQueue(String name)
Returns unbounded blocking queue instance by name.<V> RBlockingQueue<V>
getBlockingQueue(String name, Codec codec)
Returns unbounded blocking queue instance by name using provided codec for queue objects.<V> RBloomFilter<V>
getBloomFilter(String name)
Returns bloom filter instance by name.<V> RBloomFilter<V>
getBloomFilter(String name, Codec codec)
Returns bloom filter instance by name using provided codec for objects.<V> RBoundedBlockingQueue<V>
getBoundedBlockingQueue(String name)
Returns bounded blocking queue instance by name.<V> RBoundedBlockingQueue<V>
getBoundedBlockingQueue(String name, Codec codec)
Returns bounded blocking queue instance by name using provided codec for queue objects.<V> RBucket<V>
getBucket(String name)
Returns object holder instance by name.<V> RBucket<V>
getBucket(String name, Codec codec)
Returns object holder instance by name using provided codec for object.RBuckets
getBuckets()
Returns interface for mass operations with Bucket objects.RBuckets
getBuckets(Codec codec)
Returns interface for mass operations with Bucket objects using provided codec for object.ClusterNodesGroup
getClusterNodesGroup()
Get Redis cluster nodes group for server operationsConfig
getConfig()
Allows to get configuration provided during Redisson instance creation.RCountDownLatch
getCountDownLatch(String name)
Returns countDownLatch instance by name.<V> RDelayedQueue<V>
getDelayedQueue(RQueue<V> destinationQueue)
Returns unbounded delayed queue instance by name.<V> RDeque<V>
getDeque(String name)
Returns unbounded deque instance by name.<V> RDeque<V>
getDeque(String name, Codec codec)
Returns unbounded deque instance by name using provided codec for deque objects.RDoubleAdder
getDoubleAdder(String name)
Returns DoubleAdder instances by name.RScheduledExecutorService
getExecutorService(String name)
Returns ScheduledExecutorService by nameRScheduledExecutorService
getExecutorService(String name, ExecutorOptions options)
Returns ScheduledExecutorService by nameRScheduledExecutorService
getExecutorService(String name, Codec codec)
Returns ScheduledExecutorService by name using provided codec for task, response and request serializationRScheduledExecutorService
getExecutorService(String name, Codec codec, ExecutorOptions options)
Returns ScheduledExecutorService by name using provided codec for task, response and request serializationRScheduledExecutorService
getExecutorService(Codec codec, String name)
Deprecated.- usegetExecutorService(String, Codec)
instead.RLock
getFairLock(String name)
Returns lock instance by name.<V> RGeo<V>
getGeo(String name)
Returns geospatial items holder instance byname
.<V> RGeo<V>
getGeo(String name, Codec codec)
Returns geospatial items holder instance byname
using provided codec for geospatial members.<V> RHyperLogLog<V>
getHyperLogLog(String name)
Returns HyperLogLog instance by name.<V> RHyperLogLog<V>
getHyperLogLog(String name, Codec codec)
Returns HyperLogLog instance by name using provided codec for hll objects.RKeys
getKeys()
Returns interface with methods for Redis keys.RLexSortedSet
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> RList<V>
getList(String name)
Returns list instance by name.<V> RList<V>
getList(String name, Codec codec)
Returns list instance by name using provided codec for list objects.<K,V>
RListMultimap<K,V>getListMultimap(String name)
Returns List based Multimap instance by name.<K,V>
RListMultimap<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>
RListMultimapCache<K,V>getListMultimapCache(String name)
Returns List based Multimap instance by name.<K,V>
RListMultimapCache<K,V>getListMultimapCache(String name, Codec codec)
Returns List based Multimap instance by name using provided codec for both map keys and values.RLiveObjectService
getLiveObjectService()
Returns RedissonAttachedLiveObjectService which can be used to retrieve live REntity(s)<K,V>
RLocalCachedMap<K,V>getLocalCachedMap(String name, LocalCachedMapOptions<K,V> options)
Returns local cached map instance by name.<K,V>
RLocalCachedMap<K,V>getLocalCachedMap(String name, Codec codec, LocalCachedMapOptions<K,V> options)
Returns local cached map instance by name using provided codec.RLock
getLock(String name)
Returns lock instance by name.RLongAdder
getLongAdder(String name)
Returns LongAdder instances by name.<K,V>
RMap<K,V>getMap(String name)
Returns map instance by name.<K,V>
RMap<K,V>getMap(String name, MapOptions<K,V> options)
Returns map instance by name.<K,V>
RMap<K,V>getMap(String name, Codec codec)
Returns map instance by name using provided codec for both map keys and values.<K,V>
RMap<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>
RMapCache<K,V>getMapCache(String name)
Returns map-based cache instance by name.<K,V>
RMapCache<K,V>getMapCache(String name, MapOptions<K,V> options)
Returns map-based cache instance by name.<K,V>
RMapCache<K,V>getMapCache(String name, Codec codec)
Returns map-based cache instance byname
using providedcodec
for both cache keys and values.<K,V>
RMapCache<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.NodesGroup<Node>
getNodesGroup()
Get Redis nodes group for server operationsRPatternTopic
getPatternTopic(String pattern)
Returns topic instance satisfies by pattern name.RPatternTopic
getPatternTopic(String pattern, Codec codec)
Returns topic instance satisfies by pattern name using provided codec for messages.RPermitExpirableSemaphore
getPermitExpirableSemaphore(String name)
Returns semaphore instance by name.<V> RPriorityBlockingDeque<V>
getPriorityBlockingDeque(String name)
Returns unbounded priority blocking deque instance by name.<V> RPriorityBlockingDeque<V>
getPriorityBlockingDeque(String name, Codec codec)
Returns unbounded priority blocking deque instance by name using provided codec for queue objects.<V> RPriorityBlockingQueue<V>
getPriorityBlockingQueue(String name)
Returns unbounded priority blocking queue instance by name.<V> RPriorityBlockingQueue<V>
getPriorityBlockingQueue(String name, Codec codec)
Returns unbounded priority blocking queue instance by name using provided codec for queue objects.<V> RPriorityDeque<V>
getPriorityDeque(String name)
Returns priority unbounded deque instance by name.<V> RPriorityDeque<V>
getPriorityDeque(String name, Codec codec)
Returns priority unbounded deque instance by name using provided codec for queue objects.<V> RPriorityQueue<V>
getPriorityQueue(String name)
Returns priority unbounded queue instance by name.<V> RPriorityQueue<V>
getPriorityQueue(String name, Codec codec)
Returns priority unbounded queue instance by name using provided codec for queue objects.<V> RQueue<V>
getQueue(String name)
Returns unbounded queue instance by name.<V> RQueue<V>
getQueue(String name, Codec codec)
Returns unbounded queue instance by name using provided codec for queue objects.RRateLimiter
getRateLimiter(String name)
Returns rate limiter instance byname
RReadWriteLock
getReadWriteLock(String name)
Returns readWriteLock instance by name.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> RScoredSortedSet<V>
getScoredSortedSet(String name)
Returns Redis Sorted Set instance by name.<V> RScoredSortedSet<V>
getScoredSortedSet(String name, Codec codec)
Returns Redis Sorted Set instance by name using provided codec for sorted set objects.RScript
getScript()
Returns script operations objectRScript
getScript(Codec codec)
Returns script operations object using provided codec.RSemaphore
getSemaphore(String name)
Returns semaphore instance by name<V> RSet<V>
getSet(String name)
Returns set instance by name.<V> RSet<V>
getSet(String name, Codec codec)
Returns set instance by name using provided codec for set objects.<V> RSetCache<V>
getSetCache(String name)
Returns set-based cache instance byname
.<V> RSetCache<V>
getSetCache(String name, Codec codec)
Returns set-based cache instance byname
.<K,V>
RSetMultimap<K,V>getSetMultimap(String name)
Returns Set based Multimap instance by name.<K,V>
RSetMultimap<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>
RSetMultimapCache<K,V>getSetMultimapCache(String name)
Returns Set based Multimap instance by name.<K,V>
RSetMultimapCache<K,V>getSetMultimapCache(String name, Codec codec)
Returns Set based Multimap instance by name using provided codec for both map keys and values.<V> RSortedSet<V>
getSortedSet(String name)
Returns sorted set instance by name.<V> RSortedSet<V>
getSortedSet(String name, Codec codec)
Returns sorted set instance by name using provided codec for sorted set objects.<K,V>
RStream<K,V>getStream(String name)
Returns stream instance byname
<K,V>
RStream<K,V>getStream(String name, Codec codec)
Returns stream instance byname
using providedcodec
for entries.RTopic
getTopic(String name)
Returns topic instance by name.RTopic
getTopic(String name, Codec codec)
Returns topic instance by name using provided codec for messages.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 shutdownisShutdown()
already.void
shutdown()
Shutdown Redisson instance but NOT Redis server This equates to invoke shutdown(0, 2, TimeUnit.SECONDS);void
shutdown(long quietPeriod, long timeout, TimeUnit unit)
Shuts down Redisson instance but NOT Redis server Shutdown ensures that no tasks are submitted for 'the quiet period' (usually a couple seconds) before it shuts itself down.
-
-
-
Method Detail
-
getStream
<K,V> RStream<K,V> getStream(String name)
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
<K,V> RStream<K,V> getStream(String name, Codec codec)
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
-
getRateLimiter
RRateLimiter getRateLimiter(String name)
Returns rate limiter instance byname
- Parameters:
name
- of rate limiter- Returns:
- RateLimiter object
-
getBinaryStream
RBinaryStream getBinaryStream(String name)
Returns binary stream holder instance byname
- Parameters:
name
- of binary stream- Returns:
- BinaryStream object
-
getGeo
<V> RGeo<V> getGeo(String name)
Returns geospatial items holder instance byname
.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Geo object
-
getGeo
<V> RGeo<V> getGeo(String name, Codec codec)
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
-
getSetCache
<V> RSetCache<V> getSetCache(String name)
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
getSet(String, Codec)
.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- SetCache object
-
getSetCache
<V> RSetCache<V> getSetCache(String name, Codec codec)
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
getSet(String, Codec)
.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- SetCache object
-
getMapCache
<K,V> RMapCache<K,V> getMapCache(String name, Codec codec)
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
getMap(String, Codec)
.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - object namecodec
- - codec for keys and values- Returns:
- MapCache object
-
getMapCache
<K,V> RMapCache<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. Supports entry eviction with a given MaxIdleTime and TTL settings.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
- - object namecodec
- - codec for keys and valuesoptions
- - map options- Returns:
- MapCache object
-
getMapCache
<K,V> RMapCache<K,V> getMapCache(String name)
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
getMap(String)
.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- MapCache object
-
getMapCache
<K,V> RMapCache<K,V> getMapCache(String name, MapOptions<K,V> options)
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
getMap(String)
.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectoptions
- - map options- Returns:
- MapCache object
-
getBucket
<V> RBucket<V> getBucket(String name)
Returns object holder instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Bucket object
-
getBucket
<V> RBucket<V> getBucket(String name, Codec codec)
Returns object holder instance by name using provided codec for object.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- Bucket object
-
getBuckets
RBuckets getBuckets()
Returns interface for mass operations with Bucket objects.- Returns:
- Buckets
-
getBuckets
RBuckets getBuckets(Codec codec)
Returns interface for mass operations with Bucket objects using provided codec for object.- Parameters:
codec
- - codec for bucket objects- Returns:
- Buckets
-
getHyperLogLog
<V> RHyperLogLog<V> getHyperLogLog(String name)
Returns HyperLogLog instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- HyperLogLog object
-
getHyperLogLog
<V> RHyperLogLog<V> getHyperLogLog(String name, Codec codec)
Returns HyperLogLog instance by name using provided codec for hll objects.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- HyperLogLog object
-
getList
<V> RList<V> getList(String name)
Returns list instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- List object
-
getList
<V> RList<V> getList(String name, Codec codec)
Returns list instance by name using provided codec for list objects.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- List object
-
getListMultimap
<K,V> RListMultimap<K,V> getListMultimap(String name)
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
<K,V> RListMultimap<K,V> getListMultimap(String name, Codec codec)
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
<K,V> RListMultimapCache<K,V> getListMultimapCache(String name)
Returns List based Multimap instance by name. Supports key-entry eviction with a given TTL value.If eviction is not required then it's better to use regular map
getSetMultimap(String)
.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- ListMultimapCache object
-
getListMultimapCache
<K,V> RListMultimapCache<K,V> getListMultimapCache(String name, Codec codec)
Returns List based Multimap instance by name using provided codec for both map keys and values. Supports key-entry eviction with a given TTL value.If eviction is not required then it's better to use regular map
getSetMultimap(String, Codec)
.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- ListMultimapCache object
-
getLocalCachedMap
<K,V> RLocalCachedMap<K,V> getLocalCachedMap(String name, LocalCachedMapOptions<K,V> options)
Returns local cached map instance by name. Configured by parameters of options-object.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectoptions
- - local map options- Returns:
- LocalCachedMap object
-
getLocalCachedMap
<K,V> RLocalCachedMap<K,V> getLocalCachedMap(String name, Codec codec, LocalCachedMapOptions<K,V> options)
Returns local cached map instance by name using provided codec. Configured by parameters of options-object.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and valuesoptions
- - local map options- Returns:
- LocalCachedMap object
-
getMap
<K,V> RMap<K,V> getMap(String name)
Returns map instance by name.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- Map object
-
getMap
<K,V> RMap<K,V> getMap(String name, MapOptions<K,V> options)
Returns map instance by name.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectoptions
- - map options- Returns:
- Map object
-
getMap
<K,V> RMap<K,V> getMap(String name, Codec codec)
Returns map 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:
- Map object
-
getMap
<K,V> RMap<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.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and valuesoptions
- - map options- Returns:
- Map object
-
getSetMultimap
<K,V> RSetMultimap<K,V> getSetMultimap(String name)
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
<K,V> RSetMultimap<K,V> getSetMultimap(String name, Codec codec)
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
<K,V> RSetMultimapCache<K,V> getSetMultimapCache(String name)
Returns Set based Multimap instance by name. Supports key-entry eviction with a given TTL value.If eviction is not required then it's better to use regular map
getSetMultimap(String)
.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- SetMultimapCache object
-
getSetMultimapCache
<K,V> RSetMultimapCache<K,V> getSetMultimapCache(String name, Codec codec)
Returns Set based Multimap instance by name using provided codec for both map keys and values. Supports key-entry eviction with a given TTL value.If eviction is not required then it's better to use regular map
getSetMultimap(String, Codec)
.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- SetMultimapCache object
-
getSemaphore
RSemaphore getSemaphore(String name)
Returns semaphore instance by name- Parameters:
name
- - name of object- Returns:
- Semaphore object
-
getPermitExpirableSemaphore
RPermitExpirableSemaphore getPermitExpirableSemaphore(String name)
Returns semaphore instance by name. Supports lease time parameter for each acquired permit.- Parameters:
name
- - name of object- Returns:
- PermitExpirableSemaphore object
-
getLock
RLock getLock(String name)
Returns lock instance by name.Implements a non-fair locking so doesn't guarantees an acquire order by threads.
- Parameters:
name
- - name of object- Returns:
- Lock object
-
getFairLock
RLock getFairLock(String name)
Returns lock instance by name.Implements a fair locking so it guarantees an acquire order by threads.
- Parameters:
name
- - name of object- Returns:
- Lock object
-
getReadWriteLock
RReadWriteLock getReadWriteLock(String name)
Returns readWriteLock instance by name.- Parameters:
name
- - name of object- Returns:
- Lock object
-
getSet
<V> RSet<V> getSet(String name)
Returns set instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Set object
-
getSet
<V> RSet<V> getSet(String name, Codec codec)
Returns set instance by name using provided codec for set objects.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- Set object
-
getSortedSet
<V> RSortedSet<V> getSortedSet(String name)
Returns sorted set instance by name. This sorted set uses comparator to sort objects.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- SortedSet object
-
getSortedSet
<V> RSortedSet<V> getSortedSet(String name, Codec codec)
Returns sorted set instance by name using provided codec for sorted set objects. This sorted set sorts objects using comparator.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- SortedSet object
-
getScoredSortedSet
<V> RScoredSortedSet<V> getScoredSortedSet(String name)
Returns Redis Sorted Set instance by name. This sorted set sorts objects by object score.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- ScoredSortedSet object
-
getScoredSortedSet
<V> RScoredSortedSet<V> getScoredSortedSet(String name, Codec codec)
Returns Redis Sorted Set instance by name using provided codec for sorted set objects. This sorted set sorts objects by object score.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- ScoredSortedSet object
-
getLexSortedSet
RLexSortedSet 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- Parameters:
name
- - name of object- Returns:
- LexSortedSet object
-
getTopic
RTopic getTopic(String name)
Returns topic instance by name.- Parameters:
name
- - name of object- Returns:
- Topic object
-
getTopic
RTopic getTopic(String name, Codec codec)
Returns topic instance by name using provided codec for messages.- Parameters:
name
- - name of objectcodec
- - codec for message- Returns:
- Topic object
-
getPatternTopic
RPatternTopic getPatternTopic(String pattern)
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- Parameters:
pattern
- of the topic- Returns:
- PatterTopic object
-
getPatternTopic
RPatternTopic getPatternTopic(String pattern, Codec codec)
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- Parameters:
pattern
- of the topiccodec
- - codec for message- Returns:
- PatterTopic object
-
getQueue
<V> RQueue<V> getQueue(String name)
Returns unbounded queue instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- of object- Returns:
- queue object
-
getDelayedQueue
<V> RDelayedQueue<V> getDelayedQueue(RQueue<V> destinationQueue)
Returns unbounded delayed queue instance by name.Could be attached to destination queue only. All elements are inserted with transfer delay to destination queue.
- Type Parameters:
V
- type of value- Parameters:
destinationQueue
- - destination queue- Returns:
- Delayed queue object
-
getQueue
<V> RQueue<V> getQueue(String name, Codec codec)
Returns unbounded queue instance by name using provided codec for queue objects.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for message- Returns:
- Queue object
-
getPriorityQueue
<V> RPriorityQueue<V> getPriorityQueue(String name)
Returns priority unbounded queue instance by name. It uses comparator to sort objects.- Type Parameters:
V
- type of value- Parameters:
name
- of object- Returns:
- Queue object
-
getPriorityQueue
<V> RPriorityQueue<V> getPriorityQueue(String name, Codec codec)
Returns priority unbounded queue instance by name using provided codec for queue objects. It uses comparator to sort objects.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for message- Returns:
- Queue object
-
getPriorityBlockingQueue
<V> RPriorityBlockingQueue<V> getPriorityBlockingQueue(String name)
Returns unbounded priority blocking queue instance by name. It uses comparator to sort objects.- Type Parameters:
V
- type of value- Parameters:
name
- of object- Returns:
- Queue object
-
getPriorityBlockingQueue
<V> RPriorityBlockingQueue<V> getPriorityBlockingQueue(String name, Codec codec)
Returns unbounded priority blocking queue instance by name using provided codec for queue objects. It uses comparator to sort objects.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for message- Returns:
- Queue object
-
getPriorityBlockingDeque
<V> RPriorityBlockingDeque<V> getPriorityBlockingDeque(String name)
Returns unbounded priority blocking deque instance by name. It uses comparator to sort objects.- Type Parameters:
V
- type of value- Parameters:
name
- of object- Returns:
- Queue object
-
getPriorityBlockingDeque
<V> RPriorityBlockingDeque<V> getPriorityBlockingDeque(String name, Codec codec)
Returns unbounded priority blocking deque instance by name using provided codec for queue objects. It uses comparator to sort objects.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for message- Returns:
- Queue object
-
getPriorityDeque
<V> RPriorityDeque<V> getPriorityDeque(String name)
Returns priority unbounded deque instance by name. It uses comparator to sort objects.- Type Parameters:
V
- type of value- Parameters:
name
- of object- Returns:
- Queue object
-
getPriorityDeque
<V> RPriorityDeque<V> getPriorityDeque(String name, Codec codec)
Returns priority unbounded deque instance by name using provided codec for queue objects. It uses comparator to sort objects.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for message- Returns:
- Queue object
-
getBlockingQueue
<V> RBlockingQueue<V> getBlockingQueue(String name)
Returns unbounded blocking queue instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- BlockingQueue object
-
getBlockingQueue
<V> RBlockingQueue<V> getBlockingQueue(String name, Codec codec)
Returns unbounded blocking queue instance by name using provided codec for queue objects.- Type Parameters:
V
- type of value- Parameters:
name
- - name of queuecodec
- - queue objects codec- Returns:
- BlockingQueue object
-
getBoundedBlockingQueue
<V> RBoundedBlockingQueue<V> getBoundedBlockingQueue(String name)
Returns bounded blocking queue instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- of queue- Returns:
- BoundedBlockingQueue object
-
getBoundedBlockingQueue
<V> RBoundedBlockingQueue<V> getBoundedBlockingQueue(String name, Codec codec)
Returns bounded blocking queue instance by name using provided codec for queue objects.- Type Parameters:
V
- type of value- Parameters:
name
- - name of queuecodec
- - codec for values- Returns:
- BoundedBlockingQueue object
-
getDeque
<V> RDeque<V> getDeque(String name)
Returns unbounded deque instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Deque object
-
getDeque
<V> RDeque<V> getDeque(String name, Codec codec)
Returns unbounded deque instance by name using provided codec for deque objects.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- Deque object
-
getBlockingDeque
<V> RBlockingDeque<V> getBlockingDeque(String name)
Returns unbounded blocking deque instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- BlockingDeque object
-
getBlockingDeque
<V> RBlockingDeque<V> getBlockingDeque(String name, Codec codec)
Returns unbounded blocking deque instance by name using provided codec for deque objects.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - deque objects codec- Returns:
- BlockingDeque object
-
getAtomicLong
RAtomicLong getAtomicLong(String name)
Returns atomicLong instance by name.- Parameters:
name
- - name of object- Returns:
- AtomicLong object
-
getAtomicDouble
RAtomicDouble getAtomicDouble(String name)
Returns atomicDouble instance by name.- Parameters:
name
- - name of object- Returns:
- AtomicDouble object
-
getLongAdder
RLongAdder getLongAdder(String name)
Returns LongAdder instances by name.- Parameters:
name
- - name of object- Returns:
- LongAdder object
-
getDoubleAdder
RDoubleAdder getDoubleAdder(String name)
Returns DoubleAdder instances by name.- Parameters:
name
- - name of object- Returns:
- LongAdder object
-
getCountDownLatch
RCountDownLatch getCountDownLatch(String name)
Returns countDownLatch instance by name.- Parameters:
name
- - name of object- Returns:
- CountDownLatch object
-
getBitSet
RBitSet getBitSet(String name)
Returns bitSet instance by name.- Parameters:
name
- - name of object- Returns:
- BitSet object
-
getBloomFilter
<V> RBloomFilter<V> getBloomFilter(String name)
Returns bloom filter instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- BloomFilter object
-
getBloomFilter
<V> RBloomFilter<V> getBloomFilter(String name, Codec codec)
Returns bloom filter instance by name using provided codec for objects.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- BloomFilter object
-
getScript
RScript getScript()
Returns script operations object- Returns:
- Script object
-
getScript
RScript getScript(Codec codec)
Returns script operations object using provided codec.- Parameters:
codec
- - codec for params and result- Returns:
- Script object
-
getExecutorService
RScheduledExecutorService getExecutorService(String name)
Returns ScheduledExecutorService by name- Parameters:
name
- - name of object- Returns:
- ScheduledExecutorService object
-
getExecutorService
RScheduledExecutorService getExecutorService(String name, ExecutorOptions options)
Returns ScheduledExecutorService by name- Parameters:
name
- - name of objectoptions
- - options for executor- Returns:
- ScheduledExecutorService object
-
getExecutorService
@Deprecated RScheduledExecutorService getExecutorService(Codec codec, String name)
Deprecated.- usegetExecutorService(String, Codec)
instead.Returns ScheduledExecutorService by name using provided codec for task, response and request serialization Please use getExecutorService(String name, Codec codec) method instead.- Parameters:
name
- - name of objectcodec
- - codec for task, response and request- Returns:
- ScheduledExecutorService object
-
getExecutorService
RScheduledExecutorService getExecutorService(String name, Codec codec)
Returns ScheduledExecutorService by name using provided codec for task, response and request serialization- Parameters:
name
- - name of objectcodec
- - codec for task, response and request- Returns:
- ScheduledExecutorService object
- Since:
- 2.8.2
-
getExecutorService
RScheduledExecutorService getExecutorService(String name, Codec codec, ExecutorOptions options)
Returns ScheduledExecutorService by name using provided codec for task, response and request serialization- Parameters:
name
- - name of objectcodec
- - codec for task, response and requestoptions
- - options for executor- Returns:
- ScheduledExecutorService object
-
getRemoteService
RRemoteService getRemoteService()
Returns object for remote operations prefixed with the default name (redisson_remote_service)- Returns:
- RemoteService object
-
getRemoteService
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.- Parameters:
codec
- - codec for response and request- Returns:
- RemoteService object
-
getRemoteService
RRemoteService getRemoteService(String name)
Returns object for remote operations prefixed with the specified name- Parameters:
name
- - the name used as the Redis key prefix for the services- Returns:
- RemoteService object
-
getRemoteService
RRemoteService getRemoteService(String name, Codec codec)
Returns object for remote operations prefixed with the specified name and uses provided codec for method arguments and result.- Parameters:
name
- - the name used as the Redis key prefix for the servicescodec
- - codec for response and request- Returns:
- RemoteService object
-
createTransaction
RTransaction createTransaction(TransactionOptions options)
Creates transaction with READ_COMMITTED isolation level.- Parameters:
options
- - transaction configuration- Returns:
- Transaction object
-
createBatch
RBatch createBatch(BatchOptions options)
Creates batch object which could be executed later with collected group of commands in pipeline mode.- Parameters:
options
- - batch configuration- Returns:
- Batch object
-
createBatch
@Deprecated RBatch createBatch()
Deprecated.
-
getKeys
RKeys getKeys()
Returns interface with methods for Redis keys. Each of Redis/Redisson object associated with own key- Returns:
- Keys object
-
getLiveObjectService
RLiveObjectService getLiveObjectService()
Returns RedissonAttachedLiveObjectService which can be used to retrieve live REntity(s)- Returns:
- LiveObjectService object
-
shutdown
void shutdown()
Shutdown Redisson instance but NOT Redis server This equates to invoke shutdown(0, 2, TimeUnit.SECONDS);
-
shutdown
void shutdown(long quietPeriod, long timeout, TimeUnit unit)
Shuts down Redisson instance but NOT Redis server Shutdown ensures that no tasks are submitted for 'the quiet period' (usually a couple seconds) before it shuts itself down. If a task is submitted during the quiet period, it is guaranteed to be accepted and the quiet period will start over.- Parameters:
quietPeriod
- the quiet period as described in the documentationtimeout
- the maximum amount of time to wait until the executor is shutdown() regardless if a task was submitted during the quiet periodunit
- the unit ofquietPeriod
andtimeout
-
getConfig
Config getConfig()
Allows to get configuration provided during Redisson instance creation. Further changes on this object not affect Redisson instance.- Returns:
- Config object
-
getNodesGroup
NodesGroup<Node> getNodesGroup()
Get Redis nodes group for server operations- Returns:
- NodesGroup object
-
getClusterNodesGroup
ClusterNodesGroup getClusterNodesGroup()
Get Redis cluster nodes group for server operations- Returns:
- ClusterNodesGroup object
-
isShutdown
boolean isShutdown()
Returnstrue
if this Redisson instance has been shut down.- Returns:
true
if this Redisson instance has been shut down overwisefalse
-
isShuttingDown
boolean isShuttingDown()
Returnstrue
if this Redisson instance was started to be shutdown or was shutdownisShutdown()
already.- Returns:
true
if this Redisson instance was started to be shutdown or was shutdownisShutdown()
already.
-
-