public class Redisson extends Object implements RedissonClient
Modifier and Type | Method and Description |
---|---|
static Redisson |
create()
Creates an Redisson instance
|
static Redisson |
create(Config config)
Creates an Redisson instance with configuration
|
RBatch |
createBatch()
Return batch object which executes group of
command in pipeline.
|
long |
delete(String... keys)
Deprecated.
|
io.netty.util.concurrent.Future<Long> |
deleteAsync(String... keys)
Deprecated.
|
long |
deleteByPattern(String pattern)
Delete multiple objects by a key pattern
Supported glob-style patterns:
h?
|
io.netty.util.concurrent.Future<Long> |
deleteByPatternAsync(String pattern)
Delete multiple objects by a key pattern in async mode
Supported glob-style patterns:
h?
|
Collection<String> |
findKeysByPattern(String pattern)
Find keys by key search pattern
Supported glob-style patterns:
h?
|
io.netty.util.concurrent.Future<Collection<String>> |
findKeysByPatternAsync(String pattern)
Find keys by key search pattern in async mode
Supported glob-style patterns:
h?
|
void |
flushall()
Delete all the keys of all the existing databases
|
void |
flushdb()
Delete all the keys of the currently selected database
|
RAtomicLong |
getAtomicLong(String name)
Returns distributed "atomic long" instance by name.
|
RBitSet |
getBitSet(String name) |
<V> RBlockingQueue<V> |
getBlockingQueue(String name)
Returns distributed blocking queue instance by name.
|
<V> RBlockingQueue<V> |
getBlockingQueue(String name,
Codec codec) |
<V> RBucket<V> |
getBucket(String name)
Returns object holder by name
|
<V> RBucket<V> |
getBucket(String name,
Codec codec) |
<V> List<RBucket<V>> |
getBuckets(String pattern)
Returns a list of object holder by a key pattern
Supported glob-style patterns:
h?
|
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 distributed "count down latch" instance by name.
|
<V> RDeque<V> |
getDeque(String name)
Returns distributed deque instance by name.
|
<V> RDeque<V> |
getDeque(String name,
Codec codec) |
<V> RHyperLogLog<V> |
getHyperLogLog(String name)
Returns HyperLogLog object
|
<V> RHyperLogLog<V> |
getHyperLogLog(String name,
Codec codec) |
RKeys |
getKeys()
Returns keys operations.
|
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 distributed list instance by name.
|
<V> RList<V> |
getList(String name,
Codec codec) |
RLock |
getLock(String name)
Returns distributed lock instance by name.
|
<K,V> RMap<K,V> |
getMap(String name)
Returns distributed map instance by name.
|
<K,V> RMap<K,V> |
getMap(String name,
Codec codec) |
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) |
<V> RQueue<V> |
getQueue(String name)
Returns distributed queue instance by name.
|
<V> RQueue<V> |
getQueue(String name,
Codec codec) |
<V> RScoredSortedSet<V> |
getScoredSortedSet(String name)
Returns Redis Sorted Set instance by name
|
<V> RScoredSortedSet<V> |
getScoredSortedSet(String name,
Codec codec) |
RScript |
getScript()
Returns script with eval-operations support
|
<V> RSet<V> |
getSet(String name)
Returns distributed set instance by name.
|
<V> RSet<V> |
getSet(String name,
Codec codec) |
<V> RSortedSet<V> |
getSortedSet(String name)
Returns distributed sorted set instance by name.
|
<V> RSortedSet<V> |
getSortedSet(String name,
Codec codec) |
<M> RTopic<M> |
getTopic(String name)
Returns topic instance by name.
|
<M> RTopic<M> |
getTopic(String name,
Codec codec) |
void |
shutdown()
Shuts down Redisson instance NOT Redis server
|
public static Redisson create()
public static Redisson create(Config config)
config
- public <V> RBucket<V> getBucket(String name)
getBucket
in interface RedissonClient
name
- of objectpublic <V> RBucket<V> getBucket(String name, Codec codec)
getBucket
in interface RedissonClient
public <V> List<RBucket<V>> getBuckets(String pattern)
getBuckets
in interface RedissonClient
public <V> RHyperLogLog<V> getHyperLogLog(String name)
getHyperLogLog
in interface RedissonClient
name
- of objectpublic <V> RHyperLogLog<V> getHyperLogLog(String name, Codec codec)
getHyperLogLog
in interface RedissonClient
public <V> RList<V> getList(String name)
getList
in interface RedissonClient
name
- of the distributed listpublic <V> RList<V> getList(String name, Codec codec)
getList
in interface RedissonClient
public <K,V> RMap<K,V> getMap(String name)
getMap
in interface RedissonClient
name
- of the distributed mappublic <K,V> RMap<K,V> getMap(String name, Codec codec)
getMap
in interface RedissonClient
public RLock getLock(String name)
getLock
in interface RedissonClient
name
- of the distributed lockpublic <V> RSet<V> getSet(String name)
getSet
in interface RedissonClient
name
- of the distributed setpublic <V> RSet<V> getSet(String name, Codec codec)
getSet
in interface RedissonClient
public RScript getScript()
getScript
in interface RedissonClient
public <V> RSortedSet<V> getSortedSet(String name)
getSortedSet
in interface RedissonClient
name
- of the distributed setpublic <V> RSortedSet<V> getSortedSet(String name, Codec codec)
getSortedSet
in interface RedissonClient
public <V> RScoredSortedSet<V> getScoredSortedSet(String name)
getScoredSortedSet
in interface RedissonClient
name
- public <V> RScoredSortedSet<V> getScoredSortedSet(String name, Codec codec)
getScoredSortedSet
in interface RedissonClient
public RLexSortedSet getLexSortedSet(String name)
getLexSortedSet
in interface RedissonClient
name
- public <M> RTopic<M> getTopic(String name)
getTopic
in interface RedissonClient
name
- of the distributed topicpublic <M> RTopic<M> getTopic(String name, Codec codec)
getTopic
in interface RedissonClient
public <M> RPatternTopic<M> getPatternTopic(String pattern)
getPatternTopic
in interface RedissonClient
pattern
- of the topicpublic <M> RPatternTopic<M> getPatternTopic(String pattern, Codec codec)
getPatternTopic
in interface RedissonClient
public <V> RQueue<V> getQueue(String name)
getQueue
in interface RedissonClient
name
- of the distributed queuepublic <V> RQueue<V> getQueue(String name, Codec codec)
getQueue
in interface RedissonClient
public <V> RBlockingQueue<V> getBlockingQueue(String name)
getBlockingQueue
in interface RedissonClient
name
- of the distributed blocking queuepublic <V> RBlockingQueue<V> getBlockingQueue(String name, Codec codec)
getBlockingQueue
in interface RedissonClient
public <V> RDeque<V> getDeque(String name)
getDeque
in interface RedissonClient
name
- of the distributed queuepublic <V> RDeque<V> getDeque(String name, Codec codec)
getDeque
in interface RedissonClient
public RAtomicLong getAtomicLong(String name)
getAtomicLong
in interface RedissonClient
name
- of the distributed "atomic long"public RCountDownLatch getCountDownLatch(String name)
getCountDownLatch
in interface RedissonClient
name
- of the distributed "count down latch"public RBitSet getBitSet(String name)
getBitSet
in interface RedissonClient
public RKeys getKeys()
getKeys
in interface RedissonClient
public void shutdown()
shutdown
in interface RedissonClient
public Config getConfig()
getConfig
in interface RedissonClient
public Collection<String> findKeysByPattern(String pattern)
findKeysByPattern
in interface RedissonClient
pattern
- public io.netty.util.concurrent.Future<Collection<String>> findKeysByPatternAsync(String pattern)
findKeysByPatternAsync
in interface RedissonClient
pattern
- public long deleteByPattern(String pattern)
deleteByPattern
in interface RedissonClient
pattern
- public io.netty.util.concurrent.Future<Long> deleteByPatternAsync(String pattern)
deleteByPatternAsync
in interface RedissonClient
pattern
- @Deprecated public long delete(String... keys)
delete
in interface RedissonClient
keys
- - object names@Deprecated public io.netty.util.concurrent.Future<Long> deleteAsync(String... keys)
deleteAsync
in interface RedissonClient
keys
- - object namespublic NodesGroup<Node> getNodesGroup()
getNodesGroup
in interface RedissonClient
public NodesGroup<ClusterNode> getClusterNodesGroup()
getClusterNodesGroup
in interface RedissonClient
public void flushdb()
flushdb
in interface RedissonClient
public void flushall()
flushall
in interface RedissonClient
public RBatch createBatch()
createBatch
in interface RedissonClient
Copyright © 2014–2015. All rights reserved.