public interface RedissonClient
Modifier and Type | Method and Description |
---|---|
RBatch |
createBatch()
Return batch object which executes group of
command in pipeline.
|
<V> List<RBucket<V>> |
findBuckets(String pattern)
Returns a list of object holder instances by a key pattern.
|
void |
flushall()
Deprecated.
|
void |
flushdb()
Deprecated.
|
RAtomicDouble |
getAtomicDouble(String name)
Returns atomicDouble instance by name.
|
RAtomicLong |
getAtomicLong(String name)
Returns atomicLong instance by name.
|
RBitSet |
getBitSet(String name)
Returns bitSet instance by name.
|
<V> RBlockingDeque<V> |
getBlockingDeque(String name)
Returns blocking deque instance by name.
|
<V> RBlockingDeque<V> |
getBlockingDeque(String name,
Codec codec)
Returns blocking deque instance by name
using provided codec for deque objects.
|
<V> RBlockingQueue<V> |
getBlockingQueue(String name)
Returns blocking queue instance by name.
|
<V> RBlockingQueue<V> |
getBlockingQueue(String name,
Codec codec)
Returns 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> 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.
|
<V> List<RBucket<V>> |
getBuckets(String pattern)
Deprecated.
|
NodesGroup<ClusterNode> |
getClusterNodesGroup()
Get Redis cluster nodes group for server operations
|
Config |
getConfig()
Allows to get configuration provided
during Redisson instance creation.
|
RCountDownLatch |
getCountDownLatch(String name)
Returns countDownLatch instance by name.
|
<V> RDeque<V> |
getDeque(String name)
Returns deque instance by name.
|
<V> RDeque<V> |
getDeque(String name,
Codec codec)
Returns deque instance by name
using provided codec for deque objects.
|
<V> RHyperLogLog<V> |
getHyperLogLog(String name)
Returns HyperLogLog instance by name.
|
<V> RHyperLogLog<V> |
getHyperLogLog(String name,
Codec codec)
Returns HyperLogLog instance by name
using provided codec for hll objects.
|
RKeys |
getKeys()
Returns interface with methods for Redis keys.
|
RLexSortedSet |
getLexSortedSet(String name)
Returns String based Redis Sorted Set instance by name
All elements are inserted with the same score during addition,
in order to force lexicographical ordering
|
<V> RList<V> |
getList(String name)
Returns list instance by name.
|
<V> RList<V> |
getList(String name,
Codec codec)
Returns list instance by name
using provided codec for list objects.
|
RLock |
getLock(String name)
Returns lock instance 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> 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. |
NodesGroup<Node> |
getNodesGroup()
Get Redis nodes group for server operations
|
<M> RPatternTopic<M> |
getPatternTopic(String pattern)
Returns topic instance satisfies by pattern name.
|
<M> RPatternTopic<M> |
getPatternTopic(String pattern,
Codec codec)
Returns topic instance satisfies by pattern name
using provided codec for messages.
|
<V> RQueue<V> |
getQueue(String name)
Returns queue instance by name.
|
<V> RQueue<V> |
getQueue(String name,
Codec codec)
Returns queue instance by name
using provided codec for queue objects.
|
RReadWriteLock |
getReadWriteLock(String name)
Returns readWriteLock instance by name.
|
<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
|
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 . |
<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.
|
<M> RTopic<M> |
getTopic(String name)
Returns topic instance by name.
|
<M> RTopic<M> |
getTopic(String name,
Codec codec)
Returns topic instance by name
using provided codec for messages.
|
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 isShutdown() already. |
<V> Map<String,V> |
loadBucketValues(Collection<String> keys)
Returns Redis object mapped by key.
|
<V> Map<String,V> |
loadBucketValues(String... keys)
Returns Redis object mapped by key.
|
void |
saveBuckets(Map<String,?> buckets)
Saves Redis object mapped by key.
|
void |
shutdown()
Shuts down Redisson instance NOT Redis server
|
<V> RSetCache<V> getSetCache(String name)
name
.
Supports value eviction with a given TTL value.
If eviction is not required then it's better to use regular map getSet(String, Codec)
.
name
- codec
- <V> RSetCache<V> getSetCache(String name, Codec codec)
name
.
Supports value eviction with a given TTL value.
If eviction is not required then it's better to use regular map getSet(String, Codec)
.
name
- codec
- <K,V> RMapCache<K,V> getMapCache(String name, Codec codec)
name
using provided codec
for both cache keys and values.
Supports entry eviction with a given TTL value.
If eviction is not required then it's better to use regular map getMap(String, Codec)
.
name
- codec
- <K,V> RMapCache<K,V> getMapCache(String name)
If eviction is not required then it's better to use regular map getMap(String)
.
name
- <V> RBucket<V> getBucket(String name)
name
- of object<V> RBucket<V> getBucket(String name, Codec codec)
name
- of objectobject
- codec<V> List<RBucket<V>> findBuckets(String pattern)
Returns a list of object holder instances by a key pattern.
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 h[^e]llo matches hallo, hbllo, ... but not hello h[a-b]llo matches hallo and hbllo
Use \ to escape special characters if you want to match them verbatim.
Uses KEYS
Redis command.
pattern
- <V> Map<String,V> loadBucketValues(Collection<String> keys)
Returns Redis object mapped by key. Result Map is not contains key-value entry for null values.
Uses MGET
Redis command.
keys
- <V> Map<String,V> loadBucketValues(String... keys)
Returns Redis object mapped by key. Result Map is not contains key-value entry for null values.
Uses MGET
Redis command.
keys
- void saveBuckets(Map<String,?> buckets)
buckets
- @Deprecated <V> List<RBucket<V>> getBuckets(String pattern)
<V> RHyperLogLog<V> getHyperLogLog(String name)
name
- of object<V> RHyperLogLog<V> getHyperLogLog(String name, Codec codec)
name
- of objectobject
- codec<V> RList<V> getList(String name)
name
- of object<V> RList<V> getList(String name, Codec codec)
name
- of objectlist
- object codec<K,V> RMap<K,V> getMap(String name)
name
- of map<K,V> RMap<K,V> getMap(String name, Codec codec)
name
- of mapmap
- key and value codecRSemaphore getSemaphore(String name)
name
- of semaphoreRLock getLock(String name)
name
- of lockRReadWriteLock getReadWriteLock(String name)
name
- <V> RSet<V> getSet(String name)
name
- of set<V> RSet<V> getSet(String name, Codec codec)
name
- of setset
- object codec<V> RSortedSet<V> getSortedSet(String name)
name
- of sorted set<V> RSortedSet<V> getSortedSet(String name, Codec codec)
name
- of sorted setsorted
- set object codec<V> RScoredSortedSet<V> getScoredSortedSet(String name)
name
- of scored sorted set<V> RScoredSortedSet<V> getScoredSortedSet(String name, Codec codec)
name
- of scored sorted setscored
- sorted set object codecRLexSortedSet getLexSortedSet(String name)
name
- <M> RTopic<M> getTopic(String name)
name
- of topic<M> RTopic<M> getTopic(String name, Codec codec)
name
- of topicmessage
- codec<M> RPatternTopic<M> getPatternTopic(String pattern)
pattern
- of the topic<M> RPatternTopic<M> getPatternTopic(String pattern, Codec codec)
pattern
- of the topicmessage
- codec<V> RQueue<V> getQueue(String name)
name
- of queue<V> RQueue<V> getQueue(String name, Codec codec)
name
- of queuequeue
- objects codec<V> RBlockingQueue<V> getBlockingQueue(String name)
name
- of queue<V> RBlockingQueue<V> getBlockingQueue(String name, Codec codec)
name
- of queuequeue
- objects codec<V> RDeque<V> getDeque(String name)
name
- of deque<V> RDeque<V> getDeque(String name, Codec codec)
name
- of dequedeque
- objects codec<V> RBlockingDeque<V> getBlockingDeque(String name)
name
- of deque<V> RBlockingDeque<V> getBlockingDeque(String name, Codec codec)
name
- of dequedeque
- objects codecRAtomicLong getAtomicLong(String name)
name
- of atomicLongRAtomicDouble getAtomicDouble(String name)
name
- of atomicLongRCountDownLatch getCountDownLatch(String name)
name
- of countDownLatchRBitSet getBitSet(String name)
name
- of bitSet<V> RBloomFilter<V> getBloomFilter(String name)
name
- of bloom filter<V> RBloomFilter<V> getBloomFilter(String name, Codec codec)
name
- of bloom filterRScript getScript()
RBatch createBatch()
RKeys getKeys()
void shutdown()
Config getConfig()
NodesGroup<Node> getNodesGroup()
NodesGroup<ClusterNode> getClusterNodesGroup()
@Deprecated void flushdb()
RKeys.flushdb()
@Deprecated void flushall()
RKeys.flushall()
boolean isShutdown()
true
if this Redisson instance has been shut down.boolean isShuttingDown()
true
if this Redisson instance was started to be shutdown
or was shutdown isShutdown()
already.Copyright © 2014–2016. All rights reserved.