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)
Delete multiple objects by name
|
io.netty.util.concurrent.Future<Long> |
deleteAsync(String... keys)
Delete multiple objects by name in async mode
|
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.
|
<V> RBlockingQueue<V> |
getBlockingQueue(String name)
Returns distributed blocking queue instance by name.
|
<V> RBucket<V> |
getBucket(String name)
Returns object holder by name
|
<V> List<RBucket<V>> |
getBuckets(String pattern)
Returns a list of object holder by a key pattern
Supported glob-style patterns:
h?
|
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> RHyperLogLog<V> |
getHyperLogLog(String name)
Returns HyperLogLog object
|
<V> RList<V> |
getList(String name)
Returns distributed list instance by name.
|
RLock |
getLock(String name)
Returns distributed lock instance by name.
|
<K,V> RMap<K,V> |
getMap(String name)
Returns distributed map instance by name.
|
<M> RPatternTopic<M> |
getPatternTopic(String pattern)
Returns topic instance satisfies by pattern name.
|
<V> RQueue<V> |
getQueue(String name)
Returns distributed queue instance by name.
|
RScript |
getScript()
Returns script with eval-operations support
|
<V> RSet<V> |
getSet(String name)
Returns distributed set instance by name.
|
<V> RSortedSet<V> |
getSortedSet(String name)
Returns distributed sorted set instance by name.
|
<M> RTopic<M> |
getTopic(String name)
Returns topic instance by name.
|
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> 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> RList<V> getList(String name)
getList
in interface RedissonClient
name
- of the distributed listpublic <K,V> RMap<K,V> getMap(String name)
getMap
in interface RedissonClient
name
- of the distributed mappublic 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 RScript getScript()
getScript
in interface RedissonClient
public <V> RSortedSet<V> getSortedSet(String name)
getSortedSet
in interface RedissonClient
name
- of the distributed setpublic <M> RTopic<M> getTopic(String name)
getTopic
in interface RedissonClient
name
- of the distributed topicpublic <M> RPatternTopic<M> getPatternTopic(String pattern)
getPatternTopic
in interface RedissonClient
pattern
- of the topicpublic <V> RQueue<V> getQueue(String name)
getQueue
in interface RedissonClient
name
- of the distributed queuepublic <V> RBlockingQueue<V> getBlockingQueue(String name)
getBlockingQueue
in interface RedissonClient
name
- of the distributed blocking queuepublic <V> RDeque<V> getDeque(String name)
getDeque
in interface RedissonClient
name
- of the distributed queuepublic 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 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
- public long delete(String... keys)
delete
in interface RedissonClient
keys
- - object namespublic io.netty.util.concurrent.Future<Long> deleteAsync(String... keys)
deleteAsync
in interface RedissonClient
keys
- - object namespublic 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.