public class Redisson extends Object implements RedissonClient
Modifier and Type | Field and Description |
---|---|
protected Config |
config |
protected ConnectionManager |
connectionManager |
protected EvictionScheduler |
evictionScheduler |
protected ConcurrentMap<Class<?>,Class<?>> |
liveObjectClassCache |
protected QueueTransferService |
queueTransferService |
protected ConcurrentMap<String,ResponseEntry> |
responses |
protected WriteBehindService |
writeBehindService |
Modifier | Constructor and Description |
---|---|
protected |
Redisson(Config config) |
Modifier and Type | Method and Description |
---|---|
static RedissonClient |
create()
Create sync/async Redisson instance with default config
|
static RedissonClient |
create(Config config)
Create sync/async Redisson instance with provided config
|
RBatch |
createBatch()
Creates batch object which could be executed later
with collected group of commands in pipeline mode.
|
RBatch |
createBatch(BatchOptions options)
Creates batch object which could be executed later
with collected group of commands in pipeline mode.
|
static RedissonReactiveClient |
createReactive()
Create Reactive Redisson instance with default config
|
static RedissonReactiveClient |
createReactive(Config config)
Create Reactive Redisson instance with provided config
|
static RedissonRxClient |
createRx()
Create Reactive Redisson instance with default config
|
static RedissonRxClient |
createRx(Config config)
Create Reactive Redisson instance with provided config
|
RTransaction |
createTransaction(TransactionOptions options)
Creates transaction with READ_COMMITTED isolation level.
|
protected void |
enableRedissonReferenceSupport() |
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 by
name |
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() |
CommandExecutor |
getCommandExecutor() |
Config |
getConfig()
Allows to get configuration provided
during Redisson instance creation.
|
ConnectionManager |
getConnectionManager() |
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.
|
EvictionScheduler |
getEvictionScheduler() |
RScheduledExecutorService |
getExecutorService(String name)
Returns ScheduledExecutorService by name
|
RScheduledExecutorService |
getExecutorService(String name,
Codec codec)
Returns ScheduledExecutorService by name
using provided codec for task, response and request serialization
|
RScheduledExecutorService |
getExecutorService(String name,
Codec codec,
ExecutorOptions options)
Returns ScheduledExecutorService by name
using provided codec for task, response and request serialization
|
RScheduledExecutorService |
getExecutorService(String name,
ExecutorOptions options)
Returns ScheduledExecutorService by name
|
RLock |
getFairLock(String name)
Returns Lock instance by name.
|
<V> RGeo<V> |
getGeo(String name)
Returns geospatial items holder instance by
name . |
<V> RGeo<V> |
getGeo(String name,
Codec codec)
Returns geospatial items holder instance by
name
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.
|
String |
getId()
Returns id of this Redisson instance
|
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,
Codec codec,
LocalCachedMapOptions<K,V> options)
Returns local cached map instance by name
using provided codec.
|
<K,V> RLocalCachedMap<K,V> |
getLocalCachedMap(String name,
LocalCachedMapOptions<K,V> options)
Returns local cached map instance by name.
|
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,
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> RMap<K,V> |
getMap(String name,
MapOptions<K,V> options)
Returns map instance by name.
|
<K,V> RMapCache<K,V> |
getMapCache(String name)
Returns map-based cache instance by name.
|
<K,V> RMapCache<K,V> |
getMapCache(String name,
Codec codec)
Returns map-based cache instance by
name
using provided codec for both cache keys and values. |
<K,V> RMapCache<K,V> |
getMapCache(String name,
Codec codec,
MapOptions<K,V> options)
Returns map-based cache instance by
name
using provided codec for both cache keys and values. |
<K,V> RMapCache<K,V> |
getMapCache(String name,
MapOptions<K,V> options)
Returns map-based cache instance by name.
|
RLock |
getMultiLock(RLock... locks)
Returns MultiLock instance associated with specified
locks |
NodesGroup<Node> |
getNodesGroup() |
RPatternTopic |
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 by
name |
RReadWriteLock |
getReadWriteLock(String name)
Returns ReadWriteLock instance by name.
|
<T extends BaseRedisNodes> |
getRedisNodes(RedisNodes<T> nodes)
Returns API to manage Redis nodes
|
RLock |
getRedLock(RLock... locks) |
RRemoteService |
getRemoteService()
Returns object for remote operations prefixed with the default name (redisson_remote_service)
|
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.
|
RRemoteService |
getRemoteService(String name)
Returns object for remote operations prefixed with the specified name
|
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.
|
<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.
|
RScript |
getScript()
Returns script operations object
|
RScript |
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 by
name . |
<V> RSetCache<V> |
getSetCache(String name,
Codec codec)
Returns set-based cache instance by
name . |
<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 by
name
Requires Redis 5.0.0 and higher. |
<K,V> RStream<K,V> |
getStream(String name,
Codec codec)
Returns stream instance by
name
using provided codec for entries. |
<V> RTimeSeries<V> |
getTimeSeries(String name)
Returns time-series instance by
name |
<V> RTimeSeries<V> |
getTimeSeries(String name,
Codec codec)
Returns time-series instance by
name
using provided codec for values. |
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.
|
<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.
|
boolean |
isShutdown()
Returns
true if this Redisson instance has been shut down. |
boolean |
isShuttingDown()
Returns
true if this Redisson instance was started to be shutdown
or was shutdown RedissonClient.isShutdown() 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.
|
protected final QueueTransferService queueTransferService
protected final EvictionScheduler evictionScheduler
protected final WriteBehindService writeBehindService
protected final ConnectionManager connectionManager
protected final ConcurrentMap<Class<?>,Class<?>> liveObjectClassCache
protected final Config config
protected final ConcurrentMap<String,ResponseEntry> responses
protected Redisson(Config config)
public EvictionScheduler getEvictionScheduler()
public CommandExecutor getCommandExecutor()
public ConnectionManager getConnectionManager()
public static RedissonClient create()
public static RedissonClient create(Config config)
config
- for Redissonpublic static RedissonRxClient createRx()
public static RedissonRxClient createRx(Config config)
config
- for Redissonpublic static RedissonReactiveClient createReactive()
public static RedissonReactiveClient createReactive(Config config)
config
- for Redissonpublic <V> RTimeSeries<V> getTimeSeries(String name)
RedissonClient
name
getTimeSeries
in interface RedissonClient
V
- type of valuename
- - name of instancepublic <V> RTimeSeries<V> getTimeSeries(String name, Codec codec)
RedissonClient
name
using provided codec
for values.getTimeSeries
in interface RedissonClient
V
- type of valuename
- - name of instancecodec
- - codec for valuespublic <K,V> RStream<K,V> getStream(String name)
RedissonClient
name
Requires Redis 5.0.0 and higher.
getStream
in interface RedissonClient
K
- type of keyV
- type of valuename
- of streampublic <K,V> RStream<K,V> getStream(String name, Codec codec)
RedissonClient
name
using provided codec
for entries.
Requires Redis 5.0.0 and higher.
getStream
in interface RedissonClient
K
- type of keyV
- type of valuename
- - name of streamcodec
- - codec for entrypublic RBinaryStream getBinaryStream(String name)
RedissonClient
name
getBinaryStream
in interface RedissonClient
name
- of binary streampublic <V> RGeo<V> getGeo(String name)
RedissonClient
name
.getGeo
in interface RedissonClient
V
- type of valuename
- - name of objectpublic <V> RGeo<V> getGeo(String name, Codec codec)
RedissonClient
name
using provided codec for geospatial members.getGeo
in interface RedissonClient
V
- type of valuename
- - name of objectcodec
- - codec for valuepublic <V> RBucket<V> getBucket(String name)
RedissonClient
getBucket
in interface RedissonClient
V
- type of valuename
- - name of objectpublic RRateLimiter getRateLimiter(String name)
RedissonClient
name
getRateLimiter
in interface RedissonClient
name
- of rate limiterpublic <V> RBucket<V> getBucket(String name, Codec codec)
RedissonClient
getBucket
in interface RedissonClient
V
- type of valuename
- - name of objectcodec
- - codec for valuespublic RBuckets getBuckets()
RedissonClient
getBuckets
in interface RedissonClient
public RBuckets getBuckets(Codec codec)
RedissonClient
getBuckets
in interface RedissonClient
codec
- - codec for bucket objectspublic <V> RHyperLogLog<V> getHyperLogLog(String name)
RedissonClient
getHyperLogLog
in interface RedissonClient
V
- type of valuename
- - name of objectpublic <V> RHyperLogLog<V> getHyperLogLog(String name, Codec codec)
RedissonClient
getHyperLogLog
in interface RedissonClient
V
- type of valuename
- - name of objectcodec
- - codec for valuespublic <V> RList<V> getList(String name)
RedissonClient
getList
in interface RedissonClient
V
- type of valuename
- - name of objectpublic <V> RList<V> getList(String name, Codec codec)
RedissonClient
getList
in interface RedissonClient
V
- type of valuename
- - name of objectcodec
- - codec for valuespublic <K,V> RListMultimap<K,V> getListMultimap(String name)
RedissonClient
getListMultimap
in interface RedissonClient
K
- type of keyV
- type of valuename
- - name of objectpublic <K,V> RListMultimap<K,V> getListMultimap(String name, Codec codec)
RedissonClient
getListMultimap
in interface RedissonClient
K
- type of keyV
- type of valuename
- - name of objectcodec
- - codec for keys and valuespublic <K,V> RLocalCachedMap<K,V> getLocalCachedMap(String name, LocalCachedMapOptions<K,V> options)
RedissonClient
getLocalCachedMap
in interface RedissonClient
K
- type of keyV
- type of valuename
- - name of objectoptions
- - local map optionspublic <K,V> RLocalCachedMap<K,V> getLocalCachedMap(String name, Codec codec, LocalCachedMapOptions<K,V> options)
RedissonClient
getLocalCachedMap
in interface RedissonClient
K
- type of keyV
- type of valuename
- - name of objectcodec
- - codec for keys and valuesoptions
- - local map optionspublic <K,V> RMap<K,V> getMap(String name)
RedissonClient
getMap
in interface RedissonClient
K
- type of keyV
- type of valuename
- - name of objectpublic <K,V> RMap<K,V> getMap(String name, MapOptions<K,V> options)
RedissonClient
getMap
in interface RedissonClient
K
- type of keyV
- type of valuename
- - name of objectoptions
- - map optionspublic <K,V> RSetMultimap<K,V> getSetMultimap(String name)
RedissonClient
getSetMultimap
in interface RedissonClient
K
- type of keyV
- type of valuename
- - name of objectpublic <K,V> RSetMultimapCache<K,V> getSetMultimapCache(String name)
RedissonClient
If eviction is not required then it's better to use regular map RedissonClient.getSetMultimap(String)
.
getSetMultimapCache
in interface RedissonClient
K
- type of keyV
- type of valuename
- - name of objectpublic <K,V> RSetMultimapCache<K,V> getSetMultimapCache(String name, Codec codec)
RedissonClient
If eviction is not required then it's better to use regular map RedissonClient.getSetMultimap(String, Codec)
.
getSetMultimapCache
in interface RedissonClient
K
- type of keyV
- type of valuename
- - name of objectcodec
- - codec for keys and valuespublic <K,V> RListMultimapCache<K,V> getListMultimapCache(String name)
RedissonClient
If eviction is not required then it's better to use regular map RedissonClient.getSetMultimap(String)
.
getListMultimapCache
in interface RedissonClient
K
- type of keyV
- type of valuename
- - name of objectpublic <K,V> RListMultimapCache<K,V> getListMultimapCache(String name, Codec codec)
RedissonClient
If eviction is not required then it's better to use regular map RedissonClient.getSetMultimap(String, Codec)
.
getListMultimapCache
in interface RedissonClient
K
- type of keyV
- type of valuename
- - name of objectcodec
- - codec for keys and valuespublic <K,V> RSetMultimap<K,V> getSetMultimap(String name, Codec codec)
RedissonClient
getSetMultimap
in interface RedissonClient
K
- type of keyV
- type of valuename
- - name of objectcodec
- - codec for keys and valuespublic <V> RSetCache<V> getSetCache(String name)
RedissonClient
name
.
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)
.
getSetCache
in interface RedissonClient
V
- type of valuename
- - name of objectpublic <V> RSetCache<V> getSetCache(String name, Codec codec)
RedissonClient
name
.
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)
.
getSetCache
in interface RedissonClient
V
- type of valuename
- - name of objectcodec
- - codec for valuespublic <K,V> RMapCache<K,V> getMapCache(String name)
RedissonClient
If eviction is not required then it's better to use regular map RedissonClient.getMap(String)
.
getMapCache
in interface RedissonClient
K
- type of keyV
- type of valuename
- - name of objectpublic <K,V> RMapCache<K,V> getMapCache(String name, MapOptions<K,V> options)
RedissonClient
If eviction is not required then it's better to use regular map RedissonClient.getMap(String)
.
getMapCache
in interface RedissonClient
K
- type of keyV
- type of valuename
- - name of objectoptions
- - map optionspublic <K,V> RMapCache<K,V> getMapCache(String name, Codec codec)
RedissonClient
name
using provided codec
for both cache keys and values.
Supports entry eviction with a given MaxIdleTime and TTL settings.
If eviction is not required then it's better to use regular map RedissonClient.getMap(String, Codec)
.
getMapCache
in interface RedissonClient
K
- type of keyV
- type of valuename
- - object namecodec
- - codec for keys and valuespublic <K,V> RMapCache<K,V> getMapCache(String name, Codec codec, MapOptions<K,V> options)
RedissonClient
name
using provided codec
for both cache keys and values.
Supports entry eviction with a given MaxIdleTime and TTL settings.
If eviction is not required then it's better to use regular map RedissonClient.getMap(String, Codec)
.
getMapCache
in interface RedissonClient
K
- type of keyV
- type of valuename
- - object namecodec
- - codec for keys and valuesoptions
- - map optionspublic <K,V> RMap<K,V> getMap(String name, Codec codec)
RedissonClient
getMap
in interface RedissonClient
K
- type of keyV
- type of valuename
- - name of objectcodec
- - codec for keys and valuespublic <K,V> RMap<K,V> getMap(String name, Codec codec, MapOptions<K,V> options)
RedissonClient
getMap
in interface RedissonClient
K
- type of keyV
- type of valuename
- - name of objectcodec
- - codec for keys and valuesoptions
- - map optionspublic RLock getLock(String name)
RedissonClient
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.
getLock
in interface RedissonClient
name
- - name of objectpublic RLock getMultiLock(RLock... locks)
RedissonClient
locks
getMultiLock
in interface RedissonClient
locks
- - collection of lockspublic RLock getRedLock(RLock... locks)
getRedLock
in interface RedissonClient
public RLock getFairLock(String name)
RedissonClient
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.
getFairLock
in interface RedissonClient
name
- - name of objectpublic RReadWriteLock getReadWriteLock(String name)
RedissonClient
To increase reliability during failover, all operations wait for propagation to all Redis slaves.
getReadWriteLock
in interface RedissonClient
name
- - name of objectpublic <V> RSet<V> getSet(String name)
RedissonClient
getSet
in interface RedissonClient
V
- type of valuename
- - name of objectpublic <V> RSet<V> getSet(String name, Codec codec)
RedissonClient
getSet
in interface RedissonClient
V
- type of valuename
- - name of objectcodec
- - codec for valuespublic RScript getScript()
RedissonClient
getScript
in interface RedissonClient
public RScript getScript(Codec codec)
RedissonClient
getScript
in interface RedissonClient
codec
- - codec for params and resultpublic RScheduledExecutorService getExecutorService(String name)
RedissonClient
getExecutorService
in interface RedissonClient
name
- - name of objectpublic RScheduledExecutorService getExecutorService(String name, ExecutorOptions options)
RedissonClient
getExecutorService
in interface RedissonClient
name
- - name of objectoptions
- - options for executorpublic RScheduledExecutorService getExecutorService(String name, Codec codec)
RedissonClient
getExecutorService
in interface RedissonClient
name
- - name of objectcodec
- - codec for task, response and requestpublic RScheduledExecutorService getExecutorService(String name, Codec codec, ExecutorOptions options)
RedissonClient
getExecutorService
in interface RedissonClient
name
- - name of objectcodec
- - codec for task, response and requestoptions
- - options for executorpublic RRemoteService getRemoteService()
RedissonClient
getRemoteService
in interface RedissonClient
public RRemoteService getRemoteService(String name)
RedissonClient
getRemoteService
in interface RedissonClient
name
- - the name used as the Redis key prefix for the servicespublic RRemoteService getRemoteService(Codec codec)
RedissonClient
getRemoteService
in interface RedissonClient
codec
- - codec for response and requestpublic RRemoteService getRemoteService(String name, Codec codec)
RedissonClient
getRemoteService
in interface RedissonClient
name
- - the name used as the Redis key prefix for the servicescodec
- - codec for response and requestpublic <V> RSortedSet<V> getSortedSet(String name)
RedissonClient
getSortedSet
in interface RedissonClient
V
- type of valuename
- - name of objectpublic <V> RSortedSet<V> getSortedSet(String name, Codec codec)
RedissonClient
getSortedSet
in interface RedissonClient
V
- type of valuename
- - name of objectcodec
- - codec for valuespublic <V> RScoredSortedSet<V> getScoredSortedSet(String name)
RedissonClient
getScoredSortedSet
in interface RedissonClient
V
- type of valuename
- - name of objectpublic <V> RScoredSortedSet<V> getScoredSortedSet(String name, Codec codec)
RedissonClient
getScoredSortedSet
in interface RedissonClient
V
- type of valuename
- - name of objectcodec
- - codec for valuespublic RLexSortedSet getLexSortedSet(String name)
RedissonClient
getLexSortedSet
in interface RedissonClient
name
- - name of objectpublic RTopic getTopic(String name)
RedissonClient
getTopic
in interface RedissonClient
name
- - name of objectpublic RTopic getTopic(String name, Codec codec)
RedissonClient
getTopic
in interface RedissonClient
name
- - name of objectcodec
- - codec for messagepublic RPatternTopic getPatternTopic(String pattern)
RedissonClient
getPatternTopic
in interface RedissonClient
pattern
- of the topicpublic RPatternTopic getPatternTopic(String pattern, Codec codec)
RedissonClient
getPatternTopic
in interface RedissonClient
pattern
- of the topiccodec
- - codec for messagepublic <V> RDelayedQueue<V> getDelayedQueue(RQueue<V> destinationQueue)
RedissonClient
Could be attached to destination queue only. All elements are inserted with transfer delay to destination queue.
getDelayedQueue
in interface RedissonClient
V
- type of valuedestinationQueue
- - destination queuepublic <V> RQueue<V> getQueue(String name)
RedissonClient
getQueue
in interface RedissonClient
V
- type of valuename
- of objectpublic <V> RQueue<V> getQueue(String name, Codec codec)
RedissonClient
getQueue
in interface RedissonClient
V
- type of valuename
- - name of objectcodec
- - codec for messagepublic <V> RTransferQueue<V> getTransferQueue(String name)
RedissonClient
getTransferQueue
in interface RedissonClient
V
- type of valuesname
- - name of objectpublic <V> RTransferQueue<V> getTransferQueue(String name, Codec codec)
RedissonClient
getTransferQueue
in interface RedissonClient
V
- type of valuesname
- - name of objectcodec
- - code for valuespublic <V> RRingBuffer<V> getRingBuffer(String name)
RedissonClient
getRingBuffer
in interface RedissonClient
V
- value typename
- - name of objectpublic <V> RRingBuffer<V> getRingBuffer(String name, Codec codec)
RedissonClient
getRingBuffer
in interface RedissonClient
V
- value typename
- - name of objectcodec
- - codec for valuespublic <V> RBlockingQueue<V> getBlockingQueue(String name)
RedissonClient
getBlockingQueue
in interface RedissonClient
V
- type of valuename
- - name of objectpublic <V> RBlockingQueue<V> getBlockingQueue(String name, Codec codec)
RedissonClient
getBlockingQueue
in interface RedissonClient
V
- type of valuename
- - name of queuecodec
- - queue objects codecpublic <V> RBoundedBlockingQueue<V> getBoundedBlockingQueue(String name)
RedissonClient
getBoundedBlockingQueue
in interface RedissonClient
V
- type of valuename
- of queuepublic <V> RBoundedBlockingQueue<V> getBoundedBlockingQueue(String name, Codec codec)
RedissonClient
getBoundedBlockingQueue
in interface RedissonClient
V
- type of valuename
- - name of queuecodec
- - codec for valuespublic <V> RDeque<V> getDeque(String name)
RedissonClient
getDeque
in interface RedissonClient
V
- type of valuename
- - name of objectpublic <V> RDeque<V> getDeque(String name, Codec codec)
RedissonClient
getDeque
in interface RedissonClient
V
- type of valuename
- - name of objectcodec
- - codec for valuespublic <V> RBlockingDeque<V> getBlockingDeque(String name)
RedissonClient
getBlockingDeque
in interface RedissonClient
V
- type of valuename
- - name of objectpublic <V> RBlockingDeque<V> getBlockingDeque(String name, Codec codec)
RedissonClient
getBlockingDeque
in interface RedissonClient
V
- type of valuename
- - name of objectcodec
- - deque objects codecpublic RAtomicLong getAtomicLong(String name)
RedissonClient
getAtomicLong
in interface RedissonClient
name
- - name of objectpublic RLongAdder getLongAdder(String name)
RedissonClient
getLongAdder
in interface RedissonClient
name
- - name of objectpublic RDoubleAdder getDoubleAdder(String name)
RedissonClient
getDoubleAdder
in interface RedissonClient
name
- - name of objectpublic RAtomicDouble getAtomicDouble(String name)
RedissonClient
getAtomicDouble
in interface RedissonClient
name
- - name of objectpublic RCountDownLatch getCountDownLatch(String name)
RedissonClient
getCountDownLatch
in interface RedissonClient
name
- - name of objectpublic RBitSet getBitSet(String name)
RedissonClient
getBitSet
in interface RedissonClient
name
- - name of objectpublic RSemaphore getSemaphore(String name)
RedissonClient
getSemaphore
in interface RedissonClient
name
- - name of objectpublic RPermitExpirableSemaphore getPermitExpirableSemaphore(String name)
RedissonClient
getPermitExpirableSemaphore
in interface RedissonClient
name
- - name of objectpublic <V> RBloomFilter<V> getBloomFilter(String name)
RedissonClient
getBloomFilter
in interface RedissonClient
V
- type of valuename
- - name of objectpublic <V> RBloomFilter<V> getBloomFilter(String name, Codec codec)
RedissonClient
getBloomFilter
in interface RedissonClient
V
- type of valuename
- - name of objectcodec
- - codec for valuespublic RKeys getKeys()
RedissonClient
getKeys
in interface RedissonClient
public RTransaction createTransaction(TransactionOptions options)
RedissonClient
createTransaction
in interface RedissonClient
options
- - transaction configurationpublic RBatch createBatch(BatchOptions options)
RedissonClient
createBatch
in interface RedissonClient
options
- - batch configurationpublic RBatch createBatch()
RedissonClient
createBatch
in interface RedissonClient
public RLiveObjectService getLiveObjectService()
RedissonClient
getLiveObjectService
in interface RedissonClient
public void shutdown()
RedissonClient
shutdown
in interface RedissonClient
public void shutdown(long quietPeriod, long timeout, TimeUnit unit)
RedissonClient
shutdown
in interface RedissonClient
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 of quietPeriod
and timeout
public Config getConfig()
RedissonClient
getConfig
in interface RedissonClient
public <T extends BaseRedisNodes> T getRedisNodes(RedisNodes<T> nodes)
RedissonClient
getRedisNodes
in interface RedissonClient
T
- type of Redis nodes APInodes
- Redis nodes API classRedisNodes.CLUSTER
,
RedisNodes.MASTER_SLAVE
,
RedisNodes.SENTINEL_MASTER_SLAVE
,
RedisNodes.SINGLE
public NodesGroup<Node> getNodesGroup()
getNodesGroup
in interface RedissonClient
public ClusterNodesGroup getClusterNodesGroup()
getClusterNodesGroup
in interface RedissonClient
public boolean isShutdown()
RedissonClient
true
if this Redisson instance has been shut down.isShutdown
in interface RedissonClient
true
if this Redisson instance has been shut down overwise false
public boolean isShuttingDown()
RedissonClient
true
if this Redisson instance was started to be shutdown
or was shutdown RedissonClient.isShutdown()
already.isShuttingDown
in interface RedissonClient
true
if this Redisson instance was started to be shutdown
or was shutdown RedissonClient.isShutdown()
already.protected void enableRedissonReferenceSupport()
public <V> RPriorityQueue<V> getPriorityQueue(String name)
RedissonClient
getPriorityQueue
in interface RedissonClient
V
- type of valuename
- of objectpublic <V> RPriorityQueue<V> getPriorityQueue(String name, Codec codec)
RedissonClient
getPriorityQueue
in interface RedissonClient
V
- type of valuename
- - name of objectcodec
- - codec for messagepublic <V> RPriorityBlockingQueue<V> getPriorityBlockingQueue(String name)
RedissonClient
getPriorityBlockingQueue
in interface RedissonClient
V
- type of valuename
- of objectpublic <V> RPriorityBlockingQueue<V> getPriorityBlockingQueue(String name, Codec codec)
RedissonClient
getPriorityBlockingQueue
in interface RedissonClient
V
- type of valuename
- - name of objectcodec
- - codec for messagepublic <V> RPriorityBlockingDeque<V> getPriorityBlockingDeque(String name)
RedissonClient
getPriorityBlockingDeque
in interface RedissonClient
V
- type of valuename
- of objectpublic <V> RPriorityBlockingDeque<V> getPriorityBlockingDeque(String name, Codec codec)
RedissonClient
getPriorityBlockingDeque
in interface RedissonClient
V
- type of valuename
- - name of objectcodec
- - codec for messagepublic <V> RPriorityDeque<V> getPriorityDeque(String name)
RedissonClient
getPriorityDeque
in interface RedissonClient
V
- type of valuename
- of objectpublic <V> RPriorityDeque<V> getPriorityDeque(String name, Codec codec)
RedissonClient
getPriorityDeque
in interface RedissonClient
V
- type of valuename
- - name of objectcodec
- - codec for messagepublic String getId()
RedissonClient
getId
in interface RedissonClient
Copyright © 2014–2020 Redisson. All rights reserved.