Class Redisson
- java.lang.Object
-
- org.redisson.Redisson
-
- All Implemented Interfaces:
RedissonClient
public class Redisson extends Object implements RedissonClient
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 CommandAsyncExecutorcommandExecutorprotected Configconfigprotected ConnectionManagerconnectionManagerprotected EvictionSchedulerevictionSchedulerprotected ConcurrentMap<Class<?>,Class<?>>liveObjectClassCacheprotected QueueTransferServicequeueTransferServiceprotected ConcurrentMap<String,ResponseEntry>responsesprotected WriteBehindServicewriteBehindService
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static RedissonClientcreate()Create sync/async Redisson instance with default configstatic RedissonClientcreate(Config config)Create sync/async Redisson instance with provided configRBatchcreateBatch()Creates batch object which could be executed later with collected group of commands in pipeline mode.RBatchcreateBatch(BatchOptions options)Creates batch object which could be executed later with collected group of commands in pipeline mode.static RedissonReactiveClientcreateReactive()Deprecated.static RedissonReactiveClientcreateReactive(Config config)Deprecated.static RedissonRxClientcreateRx()Deprecated.static RedissonRxClientcreateRx(Config config)Deprecated.RTransactioncreateTransaction(TransactionOptions options)Creates transaction with READ_COMMITTED isolation level.RAtomicDoublegetAtomicDouble(String name)Returns atomicDouble instance by name.RAtomicLonggetAtomicLong(String name)Returns atomicLong instance by name.RBinaryStreamgetBinaryStream(String name)Returns binary stream holder instance bynameRBitSetgetBitSet(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.RBucketsgetBuckets()Returns interface for mass operations with Bucket objects.RBucketsgetBuckets(Codec codec)Returns interface for mass operations with Bucket objects using provided codec for object.ClusterNodesGroupgetClusterNodesGroup()CommandAsyncExecutorgetCommandExecutor()ConfiggetConfig()Allows to get configuration provided during Redisson instance creation.ConnectionManagergetConnectionManager()RCountDownLatchgetCountDownLatch(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.RDoubleAddergetDoubleAdder(String name)Returns DoubleAdder instances by name.EvictionSchedulergetEvictionScheduler()RScheduledExecutorServicegetExecutorService(String name)Returns ScheduledExecutorService by nameRScheduledExecutorServicegetExecutorService(String name, ExecutorOptions options)Returns ScheduledExecutorService by nameRScheduledExecutorServicegetExecutorService(String name, Codec codec)Returns ScheduledExecutorService by name using provided codec for task, response and request serializationRScheduledExecutorServicegetExecutorService(String name, Codec codec, ExecutorOptions options)Returns ScheduledExecutorService by name using provided codec for task, response and request serializationRLockgetFairLock(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 bynameusing 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.StringgetId()Returns id of this Redisson instanceRIdGeneratorgetIdGenerator(String name)Returns id generator by name.RKeysgetKeys()Returns interface with methods for Redis keys.RLexSortedSetgetLexSortedSet(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.RLiveObjectServicegetLiveObjectService()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.RLockgetLock(String name)Returns Lock instance by name.RLongAddergetLongAdder(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 bynameusing providedcodecfor both cache keys and values.<K,V>
RMapCache<K,V>getMapCache(String name, Codec codec, MapOptions<K,V> options)Returns map-based cache instance bynameusing providedcodecfor both cache keys and values.RLockgetMultiLock(RLock... locks)Returns MultiLock instance associated with specifiedlocksNodesGroup<Node>getNodesGroup()RPatternTopicgetPatternTopic(String pattern)Returns topic instance satisfies by pattern name.RPatternTopicgetPatternTopic(String pattern, Codec codec)Returns topic instance satisfies by pattern name using provided codec for messages.RPermitExpirableSemaphoregetPermitExpirableSemaphore(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.RRateLimitergetRateLimiter(String name)Returns rate limiter instance bynameRReadWriteLockgetReadWriteLock(String name)Returns ReadWriteLock instance by name.<T extends BaseRedisNodes>
TgetRedisNodes(RedisNodes<T> nodes)Returns API to manage Redis nodesRLockgetRedLock(RLock... locks)RReliableTopicgetReliableTopic(String name)Returns reliable topic instance by name.RReliableTopicgetReliableTopic(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> RRingBuffer<V>getRingBuffer(String name)Returns RingBuffer based queue.<V> RRingBuffer<V>getRingBuffer(String name, Codec codec)Returns RingBuffer based queue.<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.RScriptgetScript()Returns script operations objectRScriptgetScript(Codec codec)Returns script operations object using provided codec.RSemaphoregetSemaphore(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.RLockgetSpinLock(String name)Returns Spin lock instance by name.RLockgetSpinLock(String name, LockOptions.BackOff backOff)Returns Spin lock instance by name with specified back off options.<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 bynameusing providedcodecfor entries.<V> RTimeSeries<V>getTimeSeries(String name)Returns time-series instance byname<V> RTimeSeries<V>getTimeSeries(String name, Codec codec)Returns time-series instance bynameusing providedcodecfor values.RTopicgetTopic(String name)Returns topic instance by name.RTopicgetTopic(String name, Codec codec)Returns topic instance by name using provided codec for messages.<V> RTransferQueue<V>getTransferQueue(String name)Returns transfer queue instance by name.<V> RTransferQueue<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 shutdownRedissonClient.isShutdown()already.RedissonReactiveClientreactive()Returns Reactive Redisson instanceRedissonRxClientrxJava()Returns RxJava Redisson instancevoidshutdown()Shutdown Redisson instance but NOT Redis server This equates to invoke shutdown(0, 2, TimeUnit.SECONDS);voidshutdown(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.
-
-
-
Field Detail
-
queueTransferService
protected final QueueTransferService queueTransferService
-
evictionScheduler
protected final EvictionScheduler evictionScheduler
-
writeBehindService
protected final WriteBehindService writeBehindService
-
connectionManager
protected final ConnectionManager connectionManager
-
commandExecutor
protected final CommandAsyncExecutor commandExecutor
-
liveObjectClassCache
protected final ConcurrentMap<Class<?>,Class<?>> liveObjectClassCache
-
config
protected final Config config
-
responses
protected final ConcurrentMap<String,ResponseEntry> responses
-
-
Constructor Detail
-
Redisson
protected Redisson(Config config)
-
-
Method Detail
-
getEvictionScheduler
public EvictionScheduler getEvictionScheduler()
-
getCommandExecutor
public CommandAsyncExecutor getCommandExecutor()
-
getConnectionManager
public ConnectionManager getConnectionManager()
-
create
public static RedissonClient create()
Create sync/async Redisson instance with default config- Returns:
- Redisson instance
-
create
public static RedissonClient create(Config config)
Create sync/async Redisson instance with provided config- Parameters:
config- for Redisson- Returns:
- Redisson instance
-
createRx
@Deprecated public static RedissonRxClient createRx()
Deprecated.
-
createRx
@Deprecated public static RedissonRxClient createRx(Config config)
Deprecated.
-
rxJava
public RedissonRxClient rxJava()
Description copied from interface:RedissonClientReturns RxJava Redisson instance- Specified by:
rxJavain interfaceRedissonClient- Returns:
- redisson instance
-
createReactive
@Deprecated public static RedissonReactiveClient createReactive()
Deprecated.
-
createReactive
@Deprecated public static RedissonReactiveClient createReactive(Config config)
Deprecated.
-
reactive
public RedissonReactiveClient reactive()
Description copied from interface:RedissonClientReturns Reactive Redisson instance- Specified by:
reactivein interfaceRedissonClient- Returns:
- redisson instance
-
getTimeSeries
public <V> RTimeSeries<V> getTimeSeries(String name)
Description copied from interface:RedissonClientReturns time-series instance byname- Specified by:
getTimeSeriesin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of instance- Returns:
- RTimeSeries object
-
getTimeSeries
public <V> RTimeSeries<V> getTimeSeries(String name, Codec codec)
Description copied from interface:RedissonClientReturns time-series instance bynameusing providedcodecfor values.- Specified by:
getTimeSeriesin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of instancecodec- - codec for values- Returns:
- RTimeSeries object
-
getStream
public <K,V> RStream<K,V> getStream(String name)
Description copied from interface:RedissonClientReturns stream instance bynameRequires Redis 5.0.0 and higher.
- Specified by:
getStreamin interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- of stream- Returns:
- RStream object
-
getStream
public <K,V> RStream<K,V> getStream(String name, Codec codec)
Description copied from interface:RedissonClientReturns stream instance bynameusing providedcodecfor entries.Requires Redis 5.0.0 and higher.
- Specified by:
getStreamin interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of streamcodec- - codec for entry- Returns:
- RStream object
-
getBinaryStream
public RBinaryStream getBinaryStream(String name)
Description copied from interface:RedissonClientReturns binary stream holder instance byname- Specified by:
getBinaryStreamin interfaceRedissonClient- Parameters:
name- of binary stream- Returns:
- BinaryStream object
-
getGeo
public <V> RGeo<V> getGeo(String name)
Description copied from interface:RedissonClientReturns geospatial items holder instance byname.- Specified by:
getGeoin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- Geo object
-
getGeo
public <V> RGeo<V> getGeo(String name, Codec codec)
Description copied from interface:RedissonClientReturns geospatial items holder instance bynameusing provided codec for geospatial members.- Specified by:
getGeoin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for value- Returns:
- Geo object
-
getBucket
public <V> RBucket<V> getBucket(String name)
Description copied from interface:RedissonClientReturns object holder instance by name.- Specified by:
getBucketin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- Bucket object
-
getRateLimiter
public RRateLimiter getRateLimiter(String name)
Description copied from interface:RedissonClientReturns rate limiter instance byname- Specified by:
getRateLimiterin interfaceRedissonClient- Parameters:
name- of rate limiter- Returns:
- RateLimiter object
-
getBucket
public <V> RBucket<V> getBucket(String name, Codec codec)
Description copied from interface:RedissonClientReturns object holder instance by name using provided codec for object.- Specified by:
getBucketin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- Bucket object
-
getBuckets
public RBuckets getBuckets()
Description copied from interface:RedissonClientReturns interface for mass operations with Bucket objects.- Specified by:
getBucketsin interfaceRedissonClient- Returns:
- Buckets
-
getBuckets
public RBuckets getBuckets(Codec codec)
Description copied from interface:RedissonClientReturns interface for mass operations with Bucket objects using provided codec for object.- Specified by:
getBucketsin interfaceRedissonClient- Parameters:
codec- - codec for bucket objects- Returns:
- Buckets
-
getHyperLogLog
public <V> RHyperLogLog<V> getHyperLogLog(String name)
Description copied from interface:RedissonClientReturns HyperLogLog instance by name.- Specified by:
getHyperLogLogin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- HyperLogLog object
-
getHyperLogLog
public <V> RHyperLogLog<V> getHyperLogLog(String name, Codec codec)
Description copied from interface:RedissonClientReturns HyperLogLog instance by name using provided codec for hll objects.- Specified by:
getHyperLogLogin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- HyperLogLog object
-
getList
public <V> RList<V> getList(String name)
Description copied from interface:RedissonClientReturns list instance by name.- Specified by:
getListin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- List object
-
getList
public <V> RList<V> getList(String name, Codec codec)
Description copied from interface:RedissonClientReturns list instance by name using provided codec for list objects.- Specified by:
getListin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- List object
-
getListMultimap
public <K,V> RListMultimap<K,V> getListMultimap(String name)
Description copied from interface:RedissonClientReturns List based Multimap instance by name.- Specified by:
getListMultimapin interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of object- Returns:
- ListMultimap object
-
getListMultimap
public <K,V> RListMultimap<K,V> getListMultimap(String name, Codec codec)
Description copied from interface:RedissonClientReturns List based Multimap instance by name using provided codec for both map keys and values.- Specified by:
getListMultimapin interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - codec for keys and values- Returns:
- ListMultimap object
-
getLocalCachedMap
public <K,V> RLocalCachedMap<K,V> getLocalCachedMap(String name, LocalCachedMapOptions<K,V> options)
Description copied from interface:RedissonClientReturns local cached map instance by name. Configured by parameters of options-object.- Specified by:
getLocalCachedMapin interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectoptions- - local map options- Returns:
- LocalCachedMap object
-
getLocalCachedMap
public <K,V> RLocalCachedMap<K,V> getLocalCachedMap(String name, Codec codec, LocalCachedMapOptions<K,V> options)
Description copied from interface:RedissonClientReturns local cached map instance by name using provided codec. Configured by parameters of options-object.- Specified by:
getLocalCachedMapin interfaceRedissonClient- 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
public <K,V> RMap<K,V> getMap(String name)
Description copied from interface:RedissonClientReturns map instance by name.- Specified by:
getMapin interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of object- Returns:
- Map object
-
getMap
public <K,V> RMap<K,V> getMap(String name, MapOptions<K,V> options)
Description copied from interface:RedissonClientReturns map instance by name.- Specified by:
getMapin interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectoptions- - map options- Returns:
- Map object
-
getSetMultimap
public <K,V> RSetMultimap<K,V> getSetMultimap(String name)
Description copied from interface:RedissonClientReturns Set based Multimap instance by name.- Specified by:
getSetMultimapin interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of object- Returns:
- SetMultimap object
-
getSetMultimapCache
public <K,V> RSetMultimapCache<K,V> getSetMultimapCache(String name)
Description copied from interface:RedissonClientReturns 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
RedissonClient.getSetMultimap(String).- Specified by:
getSetMultimapCachein interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of object- Returns:
- SetMultimapCache object
-
getSetMultimapCache
public <K,V> RSetMultimapCache<K,V> getSetMultimapCache(String name, Codec codec)
Description copied from interface:RedissonClientReturns 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
RedissonClient.getSetMultimap(String, Codec).- Specified by:
getSetMultimapCachein interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - codec for keys and values- Returns:
- SetMultimapCache object
-
getListMultimapCache
public <K,V> RListMultimapCache<K,V> getListMultimapCache(String name)
Description copied from interface:RedissonClientReturns 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
RedissonClient.getSetMultimap(String).- Specified by:
getListMultimapCachein interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of object- Returns:
- ListMultimapCache object
-
getListMultimapCache
public <K,V> RListMultimapCache<K,V> getListMultimapCache(String name, Codec codec)
Description copied from interface:RedissonClientReturns 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
RedissonClient.getSetMultimap(String, Codec).- Specified by:
getListMultimapCachein interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - codec for keys and values- Returns:
- ListMultimapCache object
-
getSetMultimap
public <K,V> RSetMultimap<K,V> getSetMultimap(String name, Codec codec)
Description copied from interface:RedissonClientReturns Set based Multimap instance by name using provided codec for both map keys and values.- Specified by:
getSetMultimapin interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - codec for keys and values- Returns:
- SetMultimap object
-
getSetCache
public <V> RSetCache<V> getSetCache(String name)
Description copied from interface:RedissonClientReturns 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
RedissonClient.getSet(String, Codec).- Specified by:
getSetCachein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- SetCache object
-
getSetCache
public <V> RSetCache<V> getSetCache(String name, Codec codec)
Description copied from interface:RedissonClientReturns 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
RedissonClient.getSet(String, Codec).- Specified by:
getSetCachein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- SetCache object
-
getMapCache
public <K,V> RMapCache<K,V> getMapCache(String name)
Description copied from interface:RedissonClientReturns 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
RedissonClient.getMap(String).- Specified by:
getMapCachein interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of object- Returns:
- MapCache object
-
getMapCache
public <K,V> RMapCache<K,V> getMapCache(String name, MapOptions<K,V> options)
Description copied from interface:RedissonClientReturns 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
RedissonClient.getMap(String).- Specified by:
getMapCachein interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectoptions- - map options- Returns:
- MapCache object
-
getMapCache
public <K,V> RMapCache<K,V> getMapCache(String name, Codec codec)
Description copied from interface:RedissonClientReturns 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
RedissonClient.getMap(String, Codec).- Specified by:
getMapCachein interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - object namecodec- - codec for keys and values- Returns:
- MapCache object
-
getMapCache
public <K,V> RMapCache<K,V> getMapCache(String name, Codec codec, MapOptions<K,V> options)
Description copied from interface:RedissonClientReturns 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
RedissonClient.getMap(String, Codec).- Specified by:
getMapCachein interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - object namecodec- - codec for keys and valuesoptions- - map options- Returns:
- MapCache object
-
getMap
public <K,V> RMap<K,V> getMap(String name, Codec codec)
Description copied from interface:RedissonClientReturns map instance by name using provided codec for both map keys and values.- Specified by:
getMapin interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - codec for keys and values- Returns:
- Map object
-
getMap
public <K,V> RMap<K,V> getMap(String name, Codec codec, MapOptions<K,V> options)
Description copied from interface:RedissonClientReturns map instance by name using provided codec for both map keys and values.- Specified by:
getMapin interfaceRedissonClient- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - codec for keys and valuesoptions- - map options- Returns:
- Map object
-
getLock
public RLock getLock(String name)
Description copied from interface:RedissonClientReturns 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 interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- Lock object
-
getSpinLock
public RLock getSpinLock(String name)
Description copied from interface:RedissonClientReturns 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 interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- Lock object
-
getSpinLock
public RLock getSpinLock(String name, LockOptions.BackOff backOff)
Description copied from interface:RedissonClientReturns 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 interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- Lock object
-
getMultiLock
public RLock getMultiLock(RLock... locks)
Description copied from interface:RedissonClientReturns MultiLock instance associated with specifiedlocks- Specified by:
getMultiLockin interfaceRedissonClient- Parameters:
locks- - collection of locks- Returns:
- MultiLock object
-
getRedLock
public RLock getRedLock(RLock... locks)
- Specified by:
getRedLockin interfaceRedissonClient
-
getFairLock
public RLock getFairLock(String name)
Description copied from interface:RedissonClientReturns 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 interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- Lock object
-
getReadWriteLock
public RReadWriteLock getReadWriteLock(String name)
Description copied from interface:RedissonClientReturns ReadWriteLock instance by name.To increase reliability during failover, all operations wait for propagation to all Redis slaves.
- Specified by:
getReadWriteLockin interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- Lock object
-
getSet
public <V> RSet<V> getSet(String name)
Description copied from interface:RedissonClientReturns set instance by name.- Specified by:
getSetin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- Set object
-
getSet
public <V> RSet<V> getSet(String name, Codec codec)
Description copied from interface:RedissonClientReturns set instance by name using provided codec for set objects.- Specified by:
getSetin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- Set object
-
getScript
public RScript getScript()
Description copied from interface:RedissonClientReturns script operations object- Specified by:
getScriptin interfaceRedissonClient- Returns:
- Script object
-
getScript
public RScript getScript(Codec codec)
Description copied from interface:RedissonClientReturns script operations object using provided codec.- Specified by:
getScriptin interfaceRedissonClient- Parameters:
codec- - codec for params and result- Returns:
- Script object
-
getExecutorService
public RScheduledExecutorService getExecutorService(String name)
Description copied from interface:RedissonClientReturns ScheduledExecutorService by name- Specified by:
getExecutorServicein interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- ScheduledExecutorService object
-
getExecutorService
public RScheduledExecutorService getExecutorService(String name, ExecutorOptions options)
Description copied from interface:RedissonClientReturns ScheduledExecutorService by name- Specified by:
getExecutorServicein interfaceRedissonClient- Parameters:
name- - name of objectoptions- - options for executor- Returns:
- ScheduledExecutorService object
-
getExecutorService
public RScheduledExecutorService getExecutorService(String name, Codec codec)
Description copied from interface:RedissonClientReturns ScheduledExecutorService by name using provided codec for task, response and request serialization- Specified by:
getExecutorServicein interfaceRedissonClient- Parameters:
name- - name of objectcodec- - codec for task, response and request- Returns:
- ScheduledExecutorService object
-
getExecutorService
public RScheduledExecutorService getExecutorService(String name, Codec codec, ExecutorOptions options)
Description copied from interface:RedissonClientReturns ScheduledExecutorService by name using provided codec for task, response and request serialization- Specified by:
getExecutorServicein interfaceRedissonClient- Parameters:
name- - name of objectcodec- - codec for task, response and requestoptions- - options for executor- Returns:
- ScheduledExecutorService object
-
getRemoteService
public RRemoteService getRemoteService()
Description copied from interface:RedissonClientReturns object for remote operations prefixed with the default name (redisson_remote_service)- Specified by:
getRemoteServicein interfaceRedissonClient- Returns:
- RemoteService object
-
getRemoteService
public RRemoteService getRemoteService(String name)
Description copied from interface:RedissonClientReturns object for remote operations prefixed with the specified name- Specified by:
getRemoteServicein interfaceRedissonClient- 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:RedissonClientReturns object for remote operations prefixed with the default name (redisson_remote_service) and uses provided codec for method arguments and result.- Specified by:
getRemoteServicein interfaceRedissonClient- Parameters:
codec- - codec for response and request- Returns:
- RemoteService object
-
getRemoteService
public RRemoteService getRemoteService(String name, Codec codec)
Description copied from interface:RedissonClientReturns object for remote operations prefixed with the specified name and uses provided codec for method arguments and result.- Specified by:
getRemoteServicein interfaceRedissonClient- Parameters:
name- - the name used as the Redis key prefix for the servicescodec- - codec for response and request- Returns:
- RemoteService object
-
getSortedSet
public <V> RSortedSet<V> getSortedSet(String name)
Description copied from interface:RedissonClientReturns sorted set instance by name. This sorted set uses comparator to sort objects.- Specified by:
getSortedSetin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- SortedSet object
-
getSortedSet
public <V> RSortedSet<V> getSortedSet(String name, Codec codec)
Description copied from interface:RedissonClientReturns sorted set instance by name using provided codec for sorted set objects. This sorted set sorts objects using comparator.- Specified by:
getSortedSetin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- SortedSet object
-
getScoredSortedSet
public <V> RScoredSortedSet<V> getScoredSortedSet(String name)
Description copied from interface:RedissonClientReturns Redis Sorted Set instance by name. This sorted set sorts objects by object score.- Specified by:
getScoredSortedSetin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- ScoredSortedSet object
-
getScoredSortedSet
public <V> RScoredSortedSet<V> getScoredSortedSet(String name, Codec codec)
Description copied from interface:RedissonClientReturns Redis Sorted Set instance by name using provided codec for sorted set objects. This sorted set sorts objects by object score.- Specified by:
getScoredSortedSetin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- ScoredSortedSet object
-
getLexSortedSet
public RLexSortedSet getLexSortedSet(String name)
Description copied from interface:RedissonClientReturns 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 interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- LexSortedSet object
-
getTopic
public RTopic getTopic(String name)
Description copied from interface:RedissonClientReturns topic instance by name.Messages are delivered to all listeners attached to the same Redis setup.
- Specified by:
getTopicin interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- Topic object
-
getTopic
public RTopic getTopic(String name, Codec codec)
Description copied from interface:RedissonClientReturns topic instance by name using provided codec for messages.Messages are delivered to all listeners attached to the same Redis setup.
- Specified by:
getTopicin interfaceRedissonClient- Parameters:
name- - name of objectcodec- - codec for message- Returns:
- Topic object
-
getReliableTopic
public RReliableTopic getReliableTopic(String name)
Description copied from interface:RedissonClientReturns 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 interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- ReliableTopic object
-
getReliableTopic
public RReliableTopic getReliableTopic(String name, Codec codec)
Description copied from interface:RedissonClientReturns 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 interfaceRedissonClient- Parameters:
name- - name of objectcodec- - codec for message- Returns:
- ReliableTopic object
-
getPatternTopic
public RPatternTopic getPatternTopic(String pattern)
Description copied from interface:RedissonClientReturns 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 interfaceRedissonClient- Parameters:
pattern- of the topic- Returns:
- PatterTopic object
-
getPatternTopic
public RPatternTopic getPatternTopic(String pattern, Codec codec)
Description copied from interface:RedissonClientReturns 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 interfaceRedissonClient- Parameters:
pattern- of the topiccodec- - codec for message- Returns:
- PatterTopic object
-
getDelayedQueue
public <V> RDelayedQueue<V> getDelayedQueue(RQueue<V> destinationQueue)
Description copied from interface:RedissonClientReturns unbounded delayed queue instance by name.Could be attached to destination queue only. All elements are inserted with transfer delay to destination queue.
- Specified by:
getDelayedQueuein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
destinationQueue- - destination queue- Returns:
- Delayed queue object
-
getQueue
public <V> RQueue<V> getQueue(String name)
Description copied from interface:RedissonClientReturns unbounded queue instance by name.- Specified by:
getQueuein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- of object- Returns:
- queue object
-
getQueue
public <V> RQueue<V> getQueue(String name, Codec codec)
Description copied from interface:RedissonClientReturns unbounded queue instance by name using provided codec for queue objects.- Specified by:
getQueuein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for message- Returns:
- Queue object
-
getTransferQueue
public <V> RTransferQueue<V> getTransferQueue(String name)
Description copied from interface:RedissonClientReturns transfer queue instance by name.- Specified by:
getTransferQueuein interfaceRedissonClient- Type Parameters:
V- type of values- Parameters:
name- - name of object- Returns:
- TransferQueue object
-
getTransferQueue
public <V> RTransferQueue<V> getTransferQueue(String name, Codec codec)
Description copied from interface:RedissonClientReturns transfer queue instance by name using provided codec for queue objects.- Specified by:
getTransferQueuein interfaceRedissonClient- Type Parameters:
V- type of values- Parameters:
name- - name of objectcodec- - code for values- Returns:
- TransferQueue object
-
getRingBuffer
public <V> RRingBuffer<V> getRingBuffer(String name)
Description copied from interface:RedissonClientReturns RingBuffer based queue.- Specified by:
getRingBufferin interfaceRedissonClient- Type Parameters:
V- value type- Parameters:
name- - name of object- Returns:
- RingBuffer object
-
getRingBuffer
public <V> RRingBuffer<V> getRingBuffer(String name, Codec codec)
Description copied from interface:RedissonClientReturns RingBuffer based queue.- Specified by:
getRingBufferin interfaceRedissonClient- Type Parameters:
V- value type- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- RingBuffer object
-
getBlockingQueue
public <V> RBlockingQueue<V> getBlockingQueue(String name)
Description copied from interface:RedissonClientReturns unbounded blocking queue instance by name.- Specified by:
getBlockingQueuein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- BlockingQueue object
-
getBlockingQueue
public <V> RBlockingQueue<V> getBlockingQueue(String name, Codec codec)
Description copied from interface:RedissonClientReturns unbounded blocking queue instance by name using provided codec for queue objects.- Specified by:
getBlockingQueuein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of queuecodec- - queue objects codec- Returns:
- BlockingQueue object
-
getBoundedBlockingQueue
public <V> RBoundedBlockingQueue<V> getBoundedBlockingQueue(String name)
Description copied from interface:RedissonClientReturns bounded blocking queue instance by name.- Specified by:
getBoundedBlockingQueuein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- of queue- Returns:
- BoundedBlockingQueue object
-
getBoundedBlockingQueue
public <V> RBoundedBlockingQueue<V> getBoundedBlockingQueue(String name, Codec codec)
Description copied from interface:RedissonClientReturns bounded blocking queue instance by name using provided codec for queue objects.- Specified by:
getBoundedBlockingQueuein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of queuecodec- - codec for values- Returns:
- BoundedBlockingQueue object
-
getDeque
public <V> RDeque<V> getDeque(String name)
Description copied from interface:RedissonClientReturns unbounded deque instance by name.- Specified by:
getDequein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- Deque object
-
getDeque
public <V> RDeque<V> getDeque(String name, Codec codec)
Description copied from interface:RedissonClientReturns unbounded deque instance by name using provided codec for deque objects.- Specified by:
getDequein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- Deque object
-
getBlockingDeque
public <V> RBlockingDeque<V> getBlockingDeque(String name)
Description copied from interface:RedissonClientReturns unbounded blocking deque instance by name.- Specified by:
getBlockingDequein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- BlockingDeque object
-
getBlockingDeque
public <V> RBlockingDeque<V> getBlockingDeque(String name, Codec codec)
Description copied from interface:RedissonClientReturns unbounded blocking deque instance by name using provided codec for deque objects.- Specified by:
getBlockingDequein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - deque objects codec- Returns:
- BlockingDeque object
-
getAtomicLong
public RAtomicLong getAtomicLong(String name)
Description copied from interface:RedissonClientReturns atomicLong instance by name.- Specified by:
getAtomicLongin interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- AtomicLong object
-
getLongAdder
public RLongAdder getLongAdder(String name)
Description copied from interface:RedissonClientReturns LongAdder instances by name.- Specified by:
getLongAdderin interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- LongAdder object
-
getDoubleAdder
public RDoubleAdder getDoubleAdder(String name)
Description copied from interface:RedissonClientReturns DoubleAdder instances by name.- Specified by:
getDoubleAdderin interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- LongAdder object
-
getAtomicDouble
public RAtomicDouble getAtomicDouble(String name)
Description copied from interface:RedissonClientReturns atomicDouble instance by name.- Specified by:
getAtomicDoublein interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- AtomicDouble object
-
getCountDownLatch
public RCountDownLatch getCountDownLatch(String name)
Description copied from interface:RedissonClientReturns countDownLatch instance by name.- Specified by:
getCountDownLatchin interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- CountDownLatch object
-
getBitSet
public RBitSet getBitSet(String name)
Description copied from interface:RedissonClientReturns bitSet instance by name.- Specified by:
getBitSetin interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- BitSet object
-
getSemaphore
public RSemaphore getSemaphore(String name)
Description copied from interface:RedissonClientReturns semaphore instance by name- Specified by:
getSemaphorein interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- Semaphore object
-
getPermitExpirableSemaphore
public RPermitExpirableSemaphore getPermitExpirableSemaphore(String name)
Description copied from interface:RedissonClientReturns semaphore instance by name. Supports lease time parameter for each acquired permit.- Specified by:
getPermitExpirableSemaphorein interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- PermitExpirableSemaphore object
-
getBloomFilter
public <V> RBloomFilter<V> getBloomFilter(String name)
Description copied from interface:RedissonClientReturns bloom filter instance by name.- Specified by:
getBloomFilterin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- BloomFilter object
-
getBloomFilter
public <V> RBloomFilter<V> getBloomFilter(String name, Codec codec)
Description copied from interface:RedissonClientReturns bloom filter instance by name using provided codec for objects.- Specified by:
getBloomFilterin interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- BloomFilter object
-
getIdGenerator
public RIdGenerator getIdGenerator(String name)
Description copied from interface:RedissonClientReturns id generator by name.- Specified by:
getIdGeneratorin interfaceRedissonClient- Parameters:
name- - name of object- Returns:
- IdGenerator object
-
getKeys
public RKeys getKeys()
Description copied from interface:RedissonClientReturns interface with methods for Redis keys. Each of Redis/Redisson object associated with own key- Specified by:
getKeysin interfaceRedissonClient- Returns:
- Keys object
-
createTransaction
public RTransaction createTransaction(TransactionOptions options)
Description copied from interface:RedissonClientCreates transaction with READ_COMMITTED isolation level.- Specified by:
createTransactionin interfaceRedissonClient- Parameters:
options- - transaction configuration- Returns:
- Transaction object
-
createBatch
public RBatch createBatch(BatchOptions options)
Description copied from interface:RedissonClientCreates batch object which could be executed later with collected group of commands in pipeline mode.- Specified by:
createBatchin interfaceRedissonClient- Parameters:
options- - batch configuration- Returns:
- Batch object
-
createBatch
public RBatch createBatch()
Description copied from interface:RedissonClientCreates batch object which could be executed later with collected group of commands in pipeline mode.- Specified by:
createBatchin interfaceRedissonClient- Returns:
- Batch object
-
getLiveObjectService
public RLiveObjectService getLiveObjectService()
Description copied from interface:RedissonClientReturns RedissonAttachedLiveObjectService which can be used to retrieve live REntity(s)- Specified by:
getLiveObjectServicein interfaceRedissonClient- Returns:
- LiveObjectService object
-
shutdown
public void shutdown()
Description copied from interface:RedissonClientShutdown Redisson instance but NOT Redis server This equates to invoke shutdown(0, 2, TimeUnit.SECONDS);- Specified by:
shutdownin interfaceRedissonClient
-
shutdown
public void shutdown(long quietPeriod, long timeout, TimeUnit unit)Description copied from interface:RedissonClientShuts 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.- Specified by:
shutdownin interfaceRedissonClient- Parameters:
quietPeriod- the quiet period as described in the documentationtimeout- the maximum amount of time to wait until the executor is RedissonClient.shutdown() regardless if a task was submitted during the quiet periodunit- the unit ofquietPeriodandtimeout
-
getConfig
public Config getConfig()
Description copied from interface:RedissonClientAllows to get configuration provided during Redisson instance creation. Further changes on this object not affect Redisson instance.- Specified by:
getConfigin interfaceRedissonClient- Returns:
- Config object
-
getRedisNodes
public <T extends BaseRedisNodes> T getRedisNodes(RedisNodes<T> nodes)
Description copied from interface:RedissonClientReturns API to manage Redis nodes- Specified by:
getRedisNodesin interfaceRedissonClient- Type Parameters:
T- type of Redis nodes API- Parameters:
nodes- Redis nodes API class- Returns:
- Redis nodes API object
- See Also:
RedisNodes.CLUSTER,RedisNodes.MASTER_SLAVE,RedisNodes.SENTINEL_MASTER_SLAVE,RedisNodes.SINGLE
-
getNodesGroup
public NodesGroup<Node> getNodesGroup()
- Specified by:
getNodesGroupin interfaceRedissonClient
-
getClusterNodesGroup
public ClusterNodesGroup getClusterNodesGroup()
- Specified by:
getClusterNodesGroupin interfaceRedissonClient
-
isShutdown
public boolean isShutdown()
Description copied from interface:RedissonClientReturnstrueif this Redisson instance has been shut down.- Specified by:
isShutdownin interfaceRedissonClient- Returns:
trueif this Redisson instance has been shut down overwisefalse
-
isShuttingDown
public boolean isShuttingDown()
Description copied from interface:RedissonClientReturnstrueif this Redisson instance was started to be shutdown or was shutdownRedissonClient.isShutdown()already.- Specified by:
isShuttingDownin interfaceRedissonClient- Returns:
trueif this Redisson instance was started to be shutdown or was shutdownRedissonClient.isShutdown()already.
-
getPriorityQueue
public <V> RPriorityQueue<V> getPriorityQueue(String name)
Description copied from interface:RedissonClientReturns priority unbounded queue instance by name. It uses comparator to sort objects.- Specified by:
getPriorityQueuein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- of object- Returns:
- Queue object
-
getPriorityQueue
public <V> RPriorityQueue<V> getPriorityQueue(String name, Codec codec)
Description copied from interface:RedissonClientReturns priority unbounded queue instance by name using provided codec for queue objects. It uses comparator to sort objects.- Specified by:
getPriorityQueuein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for message- Returns:
- Queue object
-
getPriorityBlockingQueue
public <V> RPriorityBlockingQueue<V> getPriorityBlockingQueue(String name)
Description copied from interface:RedissonClientReturns unbounded priority blocking queue instance by name. It uses comparator to sort objects.- Specified by:
getPriorityBlockingQueuein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- of object- Returns:
- Queue object
-
getPriorityBlockingQueue
public <V> RPriorityBlockingQueue<V> getPriorityBlockingQueue(String name, Codec codec)
Description copied from interface:RedissonClientReturns unbounded priority blocking queue instance by name using provided codec for queue objects. It uses comparator to sort objects.- Specified by:
getPriorityBlockingQueuein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for message- Returns:
- Queue object
-
getPriorityBlockingDeque
public <V> RPriorityBlockingDeque<V> getPriorityBlockingDeque(String name)
Description copied from interface:RedissonClientReturns unbounded priority blocking deque instance by name. It uses comparator to sort objects.- Specified by:
getPriorityBlockingDequein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- of object- Returns:
- Queue object
-
getPriorityBlockingDeque
public <V> RPriorityBlockingDeque<V> getPriorityBlockingDeque(String name, Codec codec)
Description copied from interface:RedissonClientReturns unbounded priority blocking deque instance by name using provided codec for queue objects. It uses comparator to sort objects.- Specified by:
getPriorityBlockingDequein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for message- Returns:
- Queue object
-
getPriorityDeque
public <V> RPriorityDeque<V> getPriorityDeque(String name)
Description copied from interface:RedissonClientReturns priority unbounded deque instance by name. It uses comparator to sort objects.- Specified by:
getPriorityDequein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- of object- Returns:
- Queue object
-
getPriorityDeque
public <V> RPriorityDeque<V> getPriorityDeque(String name, Codec codec)
Description copied from interface:RedissonClientReturns priority unbounded deque instance by name using provided codec for queue objects. It uses comparator to sort objects.- Specified by:
getPriorityDequein interfaceRedissonClient- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for message- Returns:
- Queue object
-
getId
public String getId()
Description copied from interface:RedissonClientReturns id of this Redisson instance- Specified by:
getIdin interfaceRedissonClient- Returns:
- id
-
-