redis.clients.jedis
Class JedisCluster
java.lang.Object
redis.clients.jedis.JedisCluster
- All Implemented Interfaces:
- Closeable, BasicCommands, JedisCommands
public class JedisCluster
- extends Object
- implements JedisCommands, BasicCommands, Closeable
Method Summary |
Long |
append(String key,
String value)
|
String |
auth(String password)
|
String |
bgrewriteaof()
|
String |
bgsave()
|
Long |
bitcount(String key)
|
Long |
bitcount(String key,
long start,
long end)
|
List<String> |
blpop(int timeout,
String key)
|
List<String> |
blpop(String arg)
|
List<String> |
brpop(int timeout,
String key)
|
List<String> |
brpop(String arg)
|
void |
close()
|
String |
configResetStat()
|
Long |
dbSize()
|
String |
debug(DebugParams params)
|
Long |
decr(String key)
|
Long |
decrBy(String key,
long integer)
|
Long |
del(String key)
|
String |
echo(String string)
|
Boolean |
exists(String key)
|
Long |
expire(String key,
int seconds)
|
Long |
expireAt(String key,
long unixTime)
|
String |
flushAll()
|
String |
flushDB()
|
String |
get(String key)
|
Boolean |
getbit(String key,
long offset)
|
Map<String,JedisPool> |
getClusterNodes()
|
Long |
getDB()
|
String |
getrange(String key,
long startOffset,
long endOffset)
|
String |
getSet(String key,
String value)
|
Long |
hdel(String key,
String... field)
|
Boolean |
hexists(String key,
String field)
|
String |
hget(String key,
String field)
|
Map<String,String> |
hgetAll(String key)
|
Long |
hincrBy(String key,
String field,
long value)
|
Set<String> |
hkeys(String key)
|
Long |
hlen(String key)
|
List<String> |
hmget(String key,
String... fields)
|
String |
hmset(String key,
Map<String,String> hash)
|
ScanResult<Map.Entry<String,String>> |
hscan(String key,
int cursor)
Deprecated. |
ScanResult<Map.Entry<String,String>> |
hscan(String key,
String cursor)
|
Long |
hset(String key,
String field,
String value)
|
Long |
hsetnx(String key,
String field,
String value)
|
List<String> |
hvals(String key)
|
Long |
incr(String key)
|
Long |
incrBy(String key,
long integer)
|
String |
info()
|
String |
info(String section)
|
Long |
lastsave()
|
String |
lindex(String key,
long index)
|
Long |
linsert(String key,
BinaryClient.LIST_POSITION where,
String pivot,
String value)
|
Long |
llen(String key)
|
String |
lpop(String key)
|
Long |
lpush(String key,
String... string)
|
Long |
lpushx(String key,
String... string)
|
List<String> |
lrange(String key,
long start,
long end)
|
Long |
lrem(String key,
long count,
String value)
|
String |
lset(String key,
long index,
String value)
|
String |
ltrim(String key,
long start,
long end)
|
Long |
move(String key,
int dbIndex)
|
Long |
persist(String key)
|
Long |
pfadd(String key,
String... elements)
|
long |
pfcount(String key)
|
String |
ping()
|
String |
quit()
|
String |
rpop(String key)
|
Long |
rpush(String key,
String... string)
|
Long |
rpushx(String key,
String... string)
|
Long |
sadd(String key,
String... member)
|
String |
save()
|
Long |
scard(String key)
|
String |
select(int index)
|
String |
set(String key,
String value)
|
String |
set(String key,
String value,
String nxxx,
String expx,
long time)
|
Boolean |
setbit(String key,
long offset,
boolean value)
|
Boolean |
setbit(String key,
long offset,
String value)
|
String |
setex(String key,
int seconds,
String value)
|
Long |
setnx(String key,
String value)
|
Long |
setrange(String key,
long offset,
String value)
|
String |
shutdown()
|
Boolean |
sismember(String key,
String member)
|
String |
slaveof(String host,
int port)
|
String |
slaveofNoOne()
|
Set<String> |
smembers(String key)
|
List<String> |
sort(String key)
|
List<String> |
sort(String key,
SortingParams sortingParameters)
|
String |
spop(String key)
|
String |
srandmember(String key)
|
List<String> |
srandmember(String key,
int count)
|
Long |
srem(String key,
String... member)
|
ScanResult<String> |
sscan(String key,
int cursor)
Deprecated. |
ScanResult<String> |
sscan(String key,
String cursor)
|
Long |
strlen(String key)
|
String |
substr(String key,
int start,
int end)
|
Long |
ttl(String key)
|
String |
type(String key)
|
Long |
waitReplicas(int replicas,
long timeout)
|
Long |
zadd(String key,
double score,
String member)
|
Long |
zadd(String key,
Map<String,Double> scoreMembers)
|
Long |
zcard(String key)
|
Long |
zcount(String key,
double min,
double max)
|
Long |
zcount(String key,
String min,
String max)
|
Double |
zincrby(String key,
double score,
String member)
|
Long |
zlexcount(String key,
String min,
String max)
|
Set<String> |
zrange(String key,
long start,
long end)
|
Set<String> |
zrangeByLex(String key,
String min,
String max)
|
Set<String> |
zrangeByLex(String key,
String min,
String max,
int offset,
int count)
|
Set<String> |
zrangeByScore(String key,
double min,
double max)
|
Set<String> |
zrangeByScore(String key,
double min,
double max,
int offset,
int count)
|
Set<String> |
zrangeByScore(String key,
String min,
String max)
|
Set<String> |
zrangeByScore(String key,
String min,
String max,
int offset,
int count)
|
Set<Tuple> |
zrangeByScoreWithScores(String key,
double min,
double max)
|
Set<Tuple> |
zrangeByScoreWithScores(String key,
double min,
double max,
int offset,
int count)
|
Set<Tuple> |
zrangeByScoreWithScores(String key,
String min,
String max)
|
Set<Tuple> |
zrangeByScoreWithScores(String key,
String min,
String max,
int offset,
int count)
|
Set<Tuple> |
zrangeWithScores(String key,
long start,
long end)
|
Long |
zrank(String key,
String member)
|
Long |
zrem(String key,
String... member)
|
Long |
zremrangeByLex(String key,
String min,
String max)
|
Long |
zremrangeByRank(String key,
long start,
long end)
|
Long |
zremrangeByScore(String key,
double start,
double end)
|
Long |
zremrangeByScore(String key,
String start,
String end)
|
Set<String> |
zrevrange(String key,
long start,
long end)
|
Set<String> |
zrevrangeByScore(String key,
double max,
double min)
|
Set<String> |
zrevrangeByScore(String key,
double max,
double min,
int offset,
int count)
|
Set<String> |
zrevrangeByScore(String key,
String max,
String min)
|
Set<String> |
zrevrangeByScore(String key,
String max,
String min,
int offset,
int count)
|
Set<Tuple> |
zrevrangeByScoreWithScores(String key,
double max,
double min)
|
Set<Tuple> |
zrevrangeByScoreWithScores(String key,
double max,
double min,
int offset,
int count)
|
Set<Tuple> |
zrevrangeByScoreWithScores(String key,
String max,
String min)
|
Set<Tuple> |
zrevrangeByScoreWithScores(String key,
String max,
String min,
int offset,
int count)
|
Set<Tuple> |
zrevrangeWithScores(String key,
long start,
long end)
|
Long |
zrevrank(String key,
String member)
|
ScanResult<Tuple> |
zscan(String key,
int cursor)
Deprecated. |
ScanResult<Tuple> |
zscan(String key,
String cursor)
|
Double |
zscore(String key,
String member)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HASHSLOTS
public static final short HASHSLOTS
- See Also:
- Constant Field Values
JedisCluster
public JedisCluster(Set<HostAndPort> nodes,
int timeout)
JedisCluster
public JedisCluster(Set<HostAndPort> nodes)
JedisCluster
public JedisCluster(Set<HostAndPort> nodes,
int timeout,
int maxRedirections)
JedisCluster
public JedisCluster(Set<HostAndPort> nodes,
org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig)
JedisCluster
public JedisCluster(Set<HostAndPort> nodes,
int timeout,
org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig)
JedisCluster
public JedisCluster(Set<HostAndPort> jedisClusterNode,
int timeout,
int maxRedirections,
org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig)
close
public void close()
- Specified by:
close
in interface Closeable
set
public String set(String key,
String value)
- Specified by:
set
in interface JedisCommands
set
public String set(String key,
String value,
String nxxx,
String expx,
long time)
- Specified by:
set
in interface JedisCommands
get
public String get(String key)
- Specified by:
get
in interface JedisCommands
exists
public Boolean exists(String key)
- Specified by:
exists
in interface JedisCommands
persist
public Long persist(String key)
- Specified by:
persist
in interface JedisCommands
type
public String type(String key)
- Specified by:
type
in interface JedisCommands
expire
public Long expire(String key,
int seconds)
- Specified by:
expire
in interface JedisCommands
expireAt
public Long expireAt(String key,
long unixTime)
- Specified by:
expireAt
in interface JedisCommands
ttl
public Long ttl(String key)
- Specified by:
ttl
in interface JedisCommands
setbit
public Boolean setbit(String key,
long offset,
boolean value)
- Specified by:
setbit
in interface JedisCommands
setbit
public Boolean setbit(String key,
long offset,
String value)
- Specified by:
setbit
in interface JedisCommands
getbit
public Boolean getbit(String key,
long offset)
- Specified by:
getbit
in interface JedisCommands
setrange
public Long setrange(String key,
long offset,
String value)
- Specified by:
setrange
in interface JedisCommands
getrange
public String getrange(String key,
long startOffset,
long endOffset)
- Specified by:
getrange
in interface JedisCommands
getSet
public String getSet(String key,
String value)
- Specified by:
getSet
in interface JedisCommands
setnx
public Long setnx(String key,
String value)
- Specified by:
setnx
in interface JedisCommands
setex
public String setex(String key,
int seconds,
String value)
- Specified by:
setex
in interface JedisCommands
decrBy
public Long decrBy(String key,
long integer)
- Specified by:
decrBy
in interface JedisCommands
decr
public Long decr(String key)
- Specified by:
decr
in interface JedisCommands
incrBy
public Long incrBy(String key,
long integer)
- Specified by:
incrBy
in interface JedisCommands
incr
public Long incr(String key)
- Specified by:
incr
in interface JedisCommands
append
public Long append(String key,
String value)
- Specified by:
append
in interface JedisCommands
substr
public String substr(String key,
int start,
int end)
- Specified by:
substr
in interface JedisCommands
hset
public Long hset(String key,
String field,
String value)
- Specified by:
hset
in interface JedisCommands
hget
public String hget(String key,
String field)
- Specified by:
hget
in interface JedisCommands
hsetnx
public Long hsetnx(String key,
String field,
String value)
- Specified by:
hsetnx
in interface JedisCommands
hmset
public String hmset(String key,
Map<String,String> hash)
- Specified by:
hmset
in interface JedisCommands
hmget
public List<String> hmget(String key,
String... fields)
- Specified by:
hmget
in interface JedisCommands
hincrBy
public Long hincrBy(String key,
String field,
long value)
- Specified by:
hincrBy
in interface JedisCommands
hexists
public Boolean hexists(String key,
String field)
- Specified by:
hexists
in interface JedisCommands
hdel
public Long hdel(String key,
String... field)
- Specified by:
hdel
in interface JedisCommands
hlen
public Long hlen(String key)
- Specified by:
hlen
in interface JedisCommands
hkeys
public Set<String> hkeys(String key)
- Specified by:
hkeys
in interface JedisCommands
hvals
public List<String> hvals(String key)
- Specified by:
hvals
in interface JedisCommands
hgetAll
public Map<String,String> hgetAll(String key)
- Specified by:
hgetAll
in interface JedisCommands
rpush
public Long rpush(String key,
String... string)
- Specified by:
rpush
in interface JedisCommands
lpush
public Long lpush(String key,
String... string)
- Specified by:
lpush
in interface JedisCommands
llen
public Long llen(String key)
- Specified by:
llen
in interface JedisCommands
lrange
public List<String> lrange(String key,
long start,
long end)
- Specified by:
lrange
in interface JedisCommands
ltrim
public String ltrim(String key,
long start,
long end)
- Specified by:
ltrim
in interface JedisCommands
lindex
public String lindex(String key,
long index)
- Specified by:
lindex
in interface JedisCommands
lset
public String lset(String key,
long index,
String value)
- Specified by:
lset
in interface JedisCommands
lrem
public Long lrem(String key,
long count,
String value)
- Specified by:
lrem
in interface JedisCommands
lpop
public String lpop(String key)
- Specified by:
lpop
in interface JedisCommands
rpop
public String rpop(String key)
- Specified by:
rpop
in interface JedisCommands
sadd
public Long sadd(String key,
String... member)
- Specified by:
sadd
in interface JedisCommands
smembers
public Set<String> smembers(String key)
- Specified by:
smembers
in interface JedisCommands
srem
public Long srem(String key,
String... member)
- Specified by:
srem
in interface JedisCommands
spop
public String spop(String key)
- Specified by:
spop
in interface JedisCommands
scard
public Long scard(String key)
- Specified by:
scard
in interface JedisCommands
sismember
public Boolean sismember(String key,
String member)
- Specified by:
sismember
in interface JedisCommands
srandmember
public String srandmember(String key)
- Specified by:
srandmember
in interface JedisCommands
srandmember
public List<String> srandmember(String key,
int count)
- Specified by:
srandmember
in interface JedisCommands
strlen
public Long strlen(String key)
- Specified by:
strlen
in interface JedisCommands
zadd
public Long zadd(String key,
double score,
String member)
- Specified by:
zadd
in interface JedisCommands
zadd
public Long zadd(String key,
Map<String,Double> scoreMembers)
- Specified by:
zadd
in interface JedisCommands
zrange
public Set<String> zrange(String key,
long start,
long end)
- Specified by:
zrange
in interface JedisCommands
zrem
public Long zrem(String key,
String... member)
- Specified by:
zrem
in interface JedisCommands
zincrby
public Double zincrby(String key,
double score,
String member)
- Specified by:
zincrby
in interface JedisCommands
zrank
public Long zrank(String key,
String member)
- Specified by:
zrank
in interface JedisCommands
zrevrank
public Long zrevrank(String key,
String member)
- Specified by:
zrevrank
in interface JedisCommands
zrevrange
public Set<String> zrevrange(String key,
long start,
long end)
- Specified by:
zrevrange
in interface JedisCommands
zrangeWithScores
public Set<Tuple> zrangeWithScores(String key,
long start,
long end)
- Specified by:
zrangeWithScores
in interface JedisCommands
zrevrangeWithScores
public Set<Tuple> zrevrangeWithScores(String key,
long start,
long end)
- Specified by:
zrevrangeWithScores
in interface JedisCommands
zcard
public Long zcard(String key)
- Specified by:
zcard
in interface JedisCommands
zscore
public Double zscore(String key,
String member)
- Specified by:
zscore
in interface JedisCommands
sort
public List<String> sort(String key)
- Specified by:
sort
in interface JedisCommands
sort
public List<String> sort(String key,
SortingParams sortingParameters)
- Specified by:
sort
in interface JedisCommands
zcount
public Long zcount(String key,
double min,
double max)
- Specified by:
zcount
in interface JedisCommands
zcount
public Long zcount(String key,
String min,
String max)
- Specified by:
zcount
in interface JedisCommands
zrangeByScore
public Set<String> zrangeByScore(String key,
double min,
double max)
- Specified by:
zrangeByScore
in interface JedisCommands
zrangeByScore
public Set<String> zrangeByScore(String key,
String min,
String max)
- Specified by:
zrangeByScore
in interface JedisCommands
zrevrangeByScore
public Set<String> zrevrangeByScore(String key,
double max,
double min)
- Specified by:
zrevrangeByScore
in interface JedisCommands
zrangeByScore
public Set<String> zrangeByScore(String key,
double min,
double max,
int offset,
int count)
- Specified by:
zrangeByScore
in interface JedisCommands
zrevrangeByScore
public Set<String> zrevrangeByScore(String key,
String max,
String min)
- Specified by:
zrevrangeByScore
in interface JedisCommands
zrangeByScore
public Set<String> zrangeByScore(String key,
String min,
String max,
int offset,
int count)
- Specified by:
zrangeByScore
in interface JedisCommands
zrevrangeByScore
public Set<String> zrevrangeByScore(String key,
double max,
double min,
int offset,
int count)
- Specified by:
zrevrangeByScore
in interface JedisCommands
zrangeByScoreWithScores
public Set<Tuple> zrangeByScoreWithScores(String key,
double min,
double max)
- Specified by:
zrangeByScoreWithScores
in interface JedisCommands
zrevrangeByScoreWithScores
public Set<Tuple> zrevrangeByScoreWithScores(String key,
double max,
double min)
- Specified by:
zrevrangeByScoreWithScores
in interface JedisCommands
zrangeByScoreWithScores
public Set<Tuple> zrangeByScoreWithScores(String key,
double min,
double max,
int offset,
int count)
- Specified by:
zrangeByScoreWithScores
in interface JedisCommands
zrevrangeByScore
public Set<String> zrevrangeByScore(String key,
String max,
String min,
int offset,
int count)
- Specified by:
zrevrangeByScore
in interface JedisCommands
zrangeByScoreWithScores
public Set<Tuple> zrangeByScoreWithScores(String key,
String min,
String max)
- Specified by:
zrangeByScoreWithScores
in interface JedisCommands
zrevrangeByScoreWithScores
public Set<Tuple> zrevrangeByScoreWithScores(String key,
String max,
String min)
- Specified by:
zrevrangeByScoreWithScores
in interface JedisCommands
zrangeByScoreWithScores
public Set<Tuple> zrangeByScoreWithScores(String key,
String min,
String max,
int offset,
int count)
- Specified by:
zrangeByScoreWithScores
in interface JedisCommands
zrevrangeByScoreWithScores
public Set<Tuple> zrevrangeByScoreWithScores(String key,
double max,
double min,
int offset,
int count)
- Specified by:
zrevrangeByScoreWithScores
in interface JedisCommands
zrevrangeByScoreWithScores
public Set<Tuple> zrevrangeByScoreWithScores(String key,
String max,
String min,
int offset,
int count)
- Specified by:
zrevrangeByScoreWithScores
in interface JedisCommands
zremrangeByRank
public Long zremrangeByRank(String key,
long start,
long end)
- Specified by:
zremrangeByRank
in interface JedisCommands
zremrangeByScore
public Long zremrangeByScore(String key,
double start,
double end)
- Specified by:
zremrangeByScore
in interface JedisCommands
zremrangeByScore
public Long zremrangeByScore(String key,
String start,
String end)
- Specified by:
zremrangeByScore
in interface JedisCommands
zlexcount
public Long zlexcount(String key,
String min,
String max)
- Specified by:
zlexcount
in interface JedisCommands
zrangeByLex
public Set<String> zrangeByLex(String key,
String min,
String max)
- Specified by:
zrangeByLex
in interface JedisCommands
zrangeByLex
public Set<String> zrangeByLex(String key,
String min,
String max,
int offset,
int count)
- Specified by:
zrangeByLex
in interface JedisCommands
zremrangeByLex
public Long zremrangeByLex(String key,
String min,
String max)
- Specified by:
zremrangeByLex
in interface JedisCommands
linsert
public Long linsert(String key,
BinaryClient.LIST_POSITION where,
String pivot,
String value)
- Specified by:
linsert
in interface JedisCommands
lpushx
public Long lpushx(String key,
String... string)
- Specified by:
lpushx
in interface JedisCommands
rpushx
public Long rpushx(String key,
String... string)
- Specified by:
rpushx
in interface JedisCommands
blpop
public List<String> blpop(String arg)
- Specified by:
blpop
in interface JedisCommands
brpop
public List<String> brpop(String arg)
- Specified by:
brpop
in interface JedisCommands
del
public Long del(String key)
- Specified by:
del
in interface JedisCommands
echo
public String echo(String string)
- Specified by:
echo
in interface JedisCommands
move
public Long move(String key,
int dbIndex)
- Specified by:
move
in interface JedisCommands
bitcount
public Long bitcount(String key)
- Specified by:
bitcount
in interface JedisCommands
bitcount
public Long bitcount(String key,
long start,
long end)
- Specified by:
bitcount
in interface JedisCommands
ping
public String ping()
- Specified by:
ping
in interface BasicCommands
quit
public String quit()
- Specified by:
quit
in interface BasicCommands
flushDB
public String flushDB()
- Specified by:
flushDB
in interface BasicCommands
dbSize
public Long dbSize()
- Specified by:
dbSize
in interface BasicCommands
select
public String select(int index)
- Specified by:
select
in interface BasicCommands
flushAll
public String flushAll()
- Specified by:
flushAll
in interface BasicCommands
auth
public String auth(String password)
- Specified by:
auth
in interface BasicCommands
save
public String save()
- Specified by:
save
in interface BasicCommands
bgsave
public String bgsave()
- Specified by:
bgsave
in interface BasicCommands
bgrewriteaof
public String bgrewriteaof()
- Specified by:
bgrewriteaof
in interface BasicCommands
lastsave
public Long lastsave()
- Specified by:
lastsave
in interface BasicCommands
shutdown
public String shutdown()
- Specified by:
shutdown
in interface BasicCommands
info
public String info()
- Specified by:
info
in interface BasicCommands
info
public String info(String section)
- Specified by:
info
in interface BasicCommands
slaveof
public String slaveof(String host,
int port)
- Specified by:
slaveof
in interface BasicCommands
slaveofNoOne
public String slaveofNoOne()
- Specified by:
slaveofNoOne
in interface BasicCommands
getDB
public Long getDB()
- Specified by:
getDB
in interface BasicCommands
debug
public String debug(DebugParams params)
- Specified by:
debug
in interface BasicCommands
configResetStat
public String configResetStat()
- Specified by:
configResetStat
in interface BasicCommands
getClusterNodes
public Map<String,JedisPool> getClusterNodes()
waitReplicas
public Long waitReplicas(int replicas,
long timeout)
- Specified by:
waitReplicas
in interface BasicCommands
hscan
@Deprecated
public ScanResult<Map.Entry<String,String>> hscan(String key,
int cursor)
- Deprecated.
- Specified by:
hscan
in interface JedisCommands
sscan
@Deprecated
public ScanResult<String> sscan(String key,
int cursor)
- Deprecated.
- Specified by:
sscan
in interface JedisCommands
zscan
@Deprecated
public ScanResult<Tuple> zscan(String key,
int cursor)
- Deprecated.
- Specified by:
zscan
in interface JedisCommands
hscan
public ScanResult<Map.Entry<String,String>> hscan(String key,
String cursor)
- Specified by:
hscan
in interface JedisCommands
sscan
public ScanResult<String> sscan(String key,
String cursor)
- Specified by:
sscan
in interface JedisCommands
zscan
public ScanResult<Tuple> zscan(String key,
String cursor)
- Specified by:
zscan
in interface JedisCommands
pfadd
public Long pfadd(String key,
String... elements)
- Specified by:
pfadd
in interface JedisCommands
pfcount
public long pfcount(String key)
- Specified by:
pfcount
in interface JedisCommands
blpop
public List<String> blpop(int timeout,
String key)
- Specified by:
blpop
in interface JedisCommands
brpop
public List<String> brpop(int timeout,
String key)
- Specified by:
brpop
in interface JedisCommands
Copyright © 2014. All rights reserved.