Package redis.clients.jedis
Class ShardedJedis
- java.lang.Object
-
- redis.clients.jedis.util.Sharded<Jedis,JedisShardInfo>
-
- redis.clients.jedis.BinaryShardedJedis
-
- redis.clients.jedis.ShardedJedis
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,BinaryJedisCommands
,JedisCommands
public class ShardedJedis extends BinaryShardedJedis implements JedisCommands, Closeable
-
-
Field Summary
Fields Modifier and Type Field Description protected ShardedJedisPool
dataSource
-
Fields inherited from class redis.clients.jedis.util.Sharded
DEFAULT_KEY_TAG_PATTERN, DEFAULT_WEIGHT
-
-
Constructor Summary
Constructors Constructor Description ShardedJedis(List<JedisShardInfo> shards)
ShardedJedis(List<JedisShardInfo> shards, Pattern keyTagPattern)
ShardedJedis(List<JedisShardInfo> shards, Hashing algo)
ShardedJedis(List<JedisShardInfo> shards, Hashing algo, Pattern keyTagPattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Long
append(String key, String value)
Long
bitcount(String key)
Long
bitcount(String key, long start, long end)
List<Long>
bitfield(String key, String... arguments)
Executes BITFIELD Redis commandList<Long>
bitfieldReadonly(String key, String... arguments)
Long
bitpos(String key, boolean value)
Long
bitpos(String key, boolean value, BitPosParams params)
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()
Long
decr(String key)
Long
decrBy(String key, long decrement)
Long
del(String key)
byte[]
dump(String key)
String
echo(String string)
Boolean
exists(String key)
Long
expire(String key, int seconds)
Long
expireAt(String key, long unixTime)
Long
geoadd(String key, double longitude, double latitude, String member)
Long
geoadd(String key, Map<String,GeoCoordinate> memberCoordinateMap)
Double
geodist(String key, String member1, String member2)
Double
geodist(String key, String member1, String member2, GeoUnit unit)
List<String>
geohash(String key, String... members)
List<GeoCoordinate>
geopos(String key, String... members)
List<GeoRadiusResponse>
georadius(String key, double longitude, double latitude, double radius, GeoUnit unit)
List<GeoRadiusResponse>
georadius(String key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param)
List<GeoRadiusResponse>
georadiusByMember(String key, String member, double radius, GeoUnit unit)
List<GeoRadiusResponse>
georadiusByMember(String key, String member, double radius, GeoUnit unit, GeoRadiusParam param)
List<GeoRadiusResponse>
georadiusByMemberReadonly(String key, String member, double radius, GeoUnit unit)
List<GeoRadiusResponse>
georadiusByMemberReadonly(String key, String member, double radius, GeoUnit unit, GeoRadiusParam param)
List<GeoRadiusResponse>
georadiusReadonly(String key, double longitude, double latitude, double radius, GeoUnit unit)
List<GeoRadiusResponse>
georadiusReadonly(String key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param)
String
get(String key)
Boolean
getbit(String key, long offset)
String
getrange(String key, long startOffset, long endOffset)
String
getSet(String key, String value)
Long
hdel(String key, String... fields)
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)
Double
hincrByFloat(String key, String field, double 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, String cursor)
ScanResult<Map.Entry<String,String>>
hscan(String key, String cursor, ScanParams params)
Long
hset(String key, String field, String value)
Long
hset(String key, Map<String,String> hash)
Long
hsetnx(String key, String field, String value)
Long
hstrlen(String key, String field)
Used for HSTRLEN Redis commandList<String>
hvals(String key)
Long
incr(String key)
Long
incrBy(String key, long increment)
Double
incrByFloat(String key, double increment)
String
lindex(String key, long index)
Long
linsert(String key, ListPosition where, String pivot, String value)
Long
llen(String key)
String
lpop(String key)
List<String>
lpop(String key, int count)
Long
lpos(String key, String element)
Long
lpos(String key, String element, LPosParams params)
List<Long>
lpos(String key, String element, LPosParams params, long count)
Long
lpush(String key, String... strings)
Long
lpushx(String key, String... string)
List<String>
lrange(String key, long start, long stop)
Long
lrem(String key, long count, String value)
String
lset(String key, long index, String value)
String
ltrim(String key, long start, long stop)
Long
move(String key, int dbIndex)
Long
persist(String key)
Long
pexpire(String key, long milliseconds)
Long
pexpireAt(String key, long millisecondsTimestamp)
Long
pfadd(String key, String... elements)
long
pfcount(String key)
String
psetex(String key, long milliseconds, String value)
Long
pttl(String key)
void
resetState()
String
restore(String key, int ttl, byte[] serializedValue)
String
restoreReplace(String key, int ttl, byte[] serializedValue)
String
rpop(String key)
List<String>
rpop(String key, int count)
Long
rpush(String key, String... strings)
Long
rpushx(String key, String... string)
Long
sadd(String key, String... members)
Long
scard(String key)
Object
sendBlockingCommand(ProtocolCommand cmd, String... args)
Object
sendCommand(ProtocolCommand cmd, String... args)
String
set(String key, String value)
String
set(String key, String value, SetParams params)
Boolean
setbit(String key, long offset, boolean value)
Boolean
setbit(String key, long offset, String value)
void
setDataSource(ShardedJedisPool shardedJedisPool)
String
setex(String key, int seconds, String value)
Long
setnx(String key, String value)
Long
setrange(String key, long offset, String value)
Boolean
sismember(String key, String member)
Set<String>
smembers(String key)
List<Boolean>
smismember(String key, String... members)
List<String>
sort(String key)
List<String>
sort(String key, SortingParams sortingParameters)
String
spop(String key)
Set<String>
spop(String key, long count)
String
srandmember(String key)
List<String>
srandmember(String key, int count)
Long
srem(String key, String... members)
ScanResult<String>
sscan(String key, String cursor)
ScanResult<String>
sscan(String key, String cursor, ScanParams params)
Long
strlen(String key)
String
substr(String key, int start, int end)
Long
touch(String key)
Long
ttl(String key)
String
type(String key)
Long
unlink(String key)
long
xack(String key, String group, StreamEntryID... ids)
XACK key group ID [ID ...]StreamEntryID
xadd(String key, StreamEntryID id, Map<String,String> hash)
XADD key ID field string [field string ...]StreamEntryID
xadd(String key, StreamEntryID id, Map<String,String> hash, long maxLen, boolean approximateLength)
XADD key MAXLEN ~ LEN ID field string [field string ...]List<StreamEntry>
xclaim(String key, String group, String consumername, long minIdleTime, long newIdleTime, int retries, boolean force, StreamEntryID... ids)
XCLAIM[IDLE ] [TIME ] [RETRYCOUNT ] [FORCE] [JUSTID] long
xdel(String key, StreamEntryID... ids)
XDEL key ID [ID ...]String
xgroupCreate(String key, String consumer, StreamEntryID id, boolean makeStream)
XGROUP CREATELong
xgroupDelConsumer(String key, String groupname, String consumername)
XGROUP DELCONSUMERlong
xgroupDestroy(String key, String groupname)
XGROUP DESTROYString
xgroupSetID(String key, String groupname, StreamEntryID id)
XGROUP SETIDList<StreamConsumersInfo>
xinfoConsumers(String key, String group)
Introspection command used in order to retrieve different information about consumers in the groupList<StreamGroupInfo>
xinfoGroup(String key)
Introspection command used in order to retrieve different information about groups in the streamStreamInfo
xinfoStream(String key)
Introspection command used in order to retrieve different information about the streamLong
xlen(String key)
XLEN keyList<StreamPendingEntry>
xpending(String key, String groupname, StreamEntryID start, StreamEntryID end, int count, String consumername)
XPENDING key group [start end count] [consumer]List<StreamEntry>
xrange(String key, StreamEntryID start, StreamEntryID end, int count)
XRANGE key start end [COUNT count]List<StreamEntry>
xrevrange(String key, StreamEntryID end, StreamEntryID start, int count)
XREVRANGE key end start [COUNT] long
xtrim(String key, long maxLen, boolean approximateLength)
XTRIM key MAXLEN [~] countLong
zadd(String key, double score, String member)
Long
zadd(String key, double score, String member, ZAddParams params)
Long
zadd(String key, Map<String,Double> scoreMembers)
Long
zadd(String key, Map<String,Double> scoreMembers, ZAddParams params)
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 increment, String member)
Double
zincrby(String key, double increment, String member, ZIncrByParams params)
Long
zlexcount(String key, String min, String max)
List<Double>
zmscore(String key, String... members)
Tuple
zpopmax(String key)
Set<Tuple>
zpopmax(String key, int count)
Tuple
zpopmin(String key)
Set<Tuple>
zpopmin(String key, int count)
Set<String>
zrange(String key, long start, long stop)
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 stop)
Long
zrank(String key, String member)
Long
zrem(String key, String... members)
Long
zremrangeByLex(String key, String min, String max)
Long
zremrangeByRank(String key, long start, long stop)
Long
zremrangeByScore(String key, double min, double max)
Long
zremrangeByScore(String key, String min, String max)
Set<String>
zrevrange(String key, long start, long stop)
Set<String>
zrevrangeByLex(String key, String max, String min)
Set<String>
zrevrangeByLex(String key, String max, String min, int offset, int count)
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 stop)
Long
zrevrank(String key, String member)
ScanResult<Tuple>
zscan(String key, String cursor)
ScanResult<Tuple>
zscan(String key, String cursor, ScanParams params)
Double
zscore(String key, String member)
-
Methods inherited from class redis.clients.jedis.BinaryShardedJedis
append, bitcount, bitcount, bitfield, bitfieldReadonly, blpop, brpop, create, decr, decrBy, del, disconnect, dump, echo, exists, expire, expireAt, geoadd, geoadd, geodist, geodist, geohash, geopos, georadius, georadius, georadiusByMember, georadiusByMember, georadiusByMemberReadonly, georadiusByMemberReadonly, georadiusReadonly, georadiusReadonly, get, getbit, getrange, getSet, hdel, hexists, hget, hgetAll, hincrBy, hincrByFloat, hkeys, hlen, hmget, hmset, hscan, hscan, hset, hset, hsetnx, hstrlen, hvals, incr, incrBy, incrByFloat, lindex, linsert, llen, lpop, lpop, lpos, lpos, lpos, lpush, lpushx, lrange, lrem, lset, ltrim, move, objectEncoding, objectFreq, objectHelp, objectIdletime, objectRefcount, persist, pexpire, pexpireAt, pfadd, pfcount, pipelined, psetex, pttl, restore, restoreReplace, rpop, rpop, rpush, rpushx, sadd, scard, sendBlockingCommand, sendCommand, sendCommand, set, set, setbit, setbit, setex, setnx, setrange, sismember, smembers, smismember, sort, sort, spop, spop, srandmember, srandmember, srem, sscan, sscan, strlen, substr, touch, ttl, type, unlink, xack, xadd, xclaim, xdel, xgroupCreate, xgroupDelConsumer, xgroupDestroy, xgroupSetID, xinfoConsumers, xinfoGroup, xinfoStream, xlen, xpending, xrange, xrevrange, xtrim, zadd, zadd, zadd, zadd, zcard, zcount, zcount, zincrby, zincrby, zlexcount, zmscore, zpopmax, zpopmax, zpopmin, zpopmin, zrange, zrangeByLex, zrangeByLex, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeWithScores, zrank, zrem, zremrangeByLex, zremrangeByRank, zremrangeByScore, zremrangeByScore, zrevrange, zrevrangeByLex, zrevrangeByLex, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeWithScores, zrevrank, zscan, zscan, zscore
-
Methods inherited from class redis.clients.jedis.util.Sharded
getAllShardInfo, getAllShards, getKeyTag, getShard, getShard, getShardInfo, getShardInfo
-
-
-
-
Field Detail
-
dataSource
protected ShardedJedisPool dataSource
-
-
Constructor Detail
-
ShardedJedis
public ShardedJedis(List<JedisShardInfo> shards)
-
ShardedJedis
public ShardedJedis(List<JedisShardInfo> shards, Hashing algo)
-
ShardedJedis
public ShardedJedis(List<JedisShardInfo> shards, Pattern keyTagPattern)
-
ShardedJedis
public ShardedJedis(List<JedisShardInfo> shards, Hashing algo, Pattern keyTagPattern)
-
-
Method Detail
-
set
public String set(String key, String value)
- Specified by:
set
in interfaceJedisCommands
-
set
public String set(String key, String value, SetParams params)
- Specified by:
set
in interfaceJedisCommands
-
get
public String get(String key)
- Specified by:
get
in interfaceJedisCommands
-
echo
public String echo(String string)
- Specified by:
echo
in interfaceJedisCommands
-
exists
public Boolean exists(String key)
- Specified by:
exists
in interfaceJedisCommands
-
type
public String type(String key)
- Specified by:
type
in interfaceJedisCommands
-
dump
public byte[] dump(String key)
- Specified by:
dump
in interfaceJedisCommands
-
restore
public String restore(String key, int ttl, byte[] serializedValue)
- Specified by:
restore
in interfaceJedisCommands
-
restoreReplace
public String restoreReplace(String key, int ttl, byte[] serializedValue)
- Specified by:
restoreReplace
in interfaceJedisCommands
-
expire
public Long expire(String key, int seconds)
- Specified by:
expire
in interfaceJedisCommands
-
pexpire
public Long pexpire(String key, long milliseconds)
- Specified by:
pexpire
in interfaceJedisCommands
-
expireAt
public Long expireAt(String key, long unixTime)
- Specified by:
expireAt
in interfaceJedisCommands
-
pexpireAt
public Long pexpireAt(String key, long millisecondsTimestamp)
- Specified by:
pexpireAt
in interfaceJedisCommands
-
ttl
public Long ttl(String key)
- Specified by:
ttl
in interfaceJedisCommands
-
pttl
public Long pttl(String key)
- Specified by:
pttl
in interfaceJedisCommands
-
setbit
public Boolean setbit(String key, long offset, boolean value)
- Specified by:
setbit
in interfaceJedisCommands
-
setbit
public Boolean setbit(String key, long offset, String value)
- Specified by:
setbit
in interfaceJedisCommands
-
getbit
public Boolean getbit(String key, long offset)
- Specified by:
getbit
in interfaceJedisCommands
-
setrange
public Long setrange(String key, long offset, String value)
- Specified by:
setrange
in interfaceJedisCommands
-
getrange
public String getrange(String key, long startOffset, long endOffset)
- Specified by:
getrange
in interfaceJedisCommands
-
getSet
public String getSet(String key, String value)
- Specified by:
getSet
in interfaceJedisCommands
-
setnx
public Long setnx(String key, String value)
- Specified by:
setnx
in interfaceJedisCommands
-
setex
public String setex(String key, int seconds, String value)
- Specified by:
setex
in interfaceJedisCommands
-
psetex
public String psetex(String key, long milliseconds, String value)
- Specified by:
psetex
in interfaceJedisCommands
-
blpop
public List<String> blpop(int timeout, String key)
- Specified by:
blpop
in interfaceJedisCommands
-
brpop
public List<String> brpop(int timeout, String key)
- Specified by:
brpop
in interfaceJedisCommands
-
decrBy
public Long decrBy(String key, long decrement)
- Specified by:
decrBy
in interfaceJedisCommands
-
decr
public Long decr(String key)
- Specified by:
decr
in interfaceJedisCommands
-
incrBy
public Long incrBy(String key, long increment)
- Specified by:
incrBy
in interfaceJedisCommands
-
incrByFloat
public Double incrByFloat(String key, double increment)
- Specified by:
incrByFloat
in interfaceJedisCommands
-
incr
public Long incr(String key)
- Specified by:
incr
in interfaceJedisCommands
-
append
public Long append(String key, String value)
- Specified by:
append
in interfaceJedisCommands
-
substr
public String substr(String key, int start, int end)
- Specified by:
substr
in interfaceJedisCommands
-
hset
public Long hset(String key, String field, String value)
- Specified by:
hset
in interfaceJedisCommands
-
hset
public Long hset(String key, Map<String,String> hash)
- Specified by:
hset
in interfaceJedisCommands
-
hget
public String hget(String key, String field)
- Specified by:
hget
in interfaceJedisCommands
-
hsetnx
public Long hsetnx(String key, String field, String value)
- Specified by:
hsetnx
in interfaceJedisCommands
-
hmset
public String hmset(String key, Map<String,String> hash)
- Specified by:
hmset
in interfaceJedisCommands
-
hmget
public List<String> hmget(String key, String... fields)
- Specified by:
hmget
in interfaceJedisCommands
-
hincrBy
public Long hincrBy(String key, String field, long value)
- Specified by:
hincrBy
in interfaceJedisCommands
-
hincrByFloat
public Double hincrByFloat(String key, String field, double value)
- Specified by:
hincrByFloat
in interfaceJedisCommands
-
hexists
public Boolean hexists(String key, String field)
- Specified by:
hexists
in interfaceJedisCommands
-
del
public Long del(String key)
- Specified by:
del
in interfaceJedisCommands
-
unlink
public Long unlink(String key)
- Specified by:
unlink
in interfaceJedisCommands
-
hdel
public Long hdel(String key, String... fields)
- Specified by:
hdel
in interfaceJedisCommands
-
hlen
public Long hlen(String key)
- Specified by:
hlen
in interfaceJedisCommands
-
hkeys
public Set<String> hkeys(String key)
- Specified by:
hkeys
in interfaceJedisCommands
-
hvals
public List<String> hvals(String key)
- Specified by:
hvals
in interfaceJedisCommands
-
hgetAll
public Map<String,String> hgetAll(String key)
- Specified by:
hgetAll
in interfaceJedisCommands
-
rpush
public Long rpush(String key, String... strings)
- Specified by:
rpush
in interfaceJedisCommands
-
lpush
public Long lpush(String key, String... strings)
- Specified by:
lpush
in interfaceJedisCommands
-
lpushx
public Long lpushx(String key, String... string)
- Specified by:
lpushx
in interfaceJedisCommands
-
strlen
public Long strlen(String key)
- Specified by:
strlen
in interfaceJedisCommands
-
move
public Long move(String key, int dbIndex)
- Specified by:
move
in interfaceJedisCommands
-
rpushx
public Long rpushx(String key, String... string)
- Specified by:
rpushx
in interfaceJedisCommands
-
persist
public Long persist(String key)
- Specified by:
persist
in interfaceJedisCommands
-
llen
public Long llen(String key)
- Specified by:
llen
in interfaceJedisCommands
-
lrange
public List<String> lrange(String key, long start, long stop)
- Specified by:
lrange
in interfaceJedisCommands
-
ltrim
public String ltrim(String key, long start, long stop)
- Specified by:
ltrim
in interfaceJedisCommands
-
lindex
public String lindex(String key, long index)
- Specified by:
lindex
in interfaceJedisCommands
-
lset
public String lset(String key, long index, String value)
- Specified by:
lset
in interfaceJedisCommands
-
lrem
public Long lrem(String key, long count, String value)
- Specified by:
lrem
in interfaceJedisCommands
-
lpop
public String lpop(String key)
- Specified by:
lpop
in interfaceJedisCommands
-
lpop
public List<String> lpop(String key, int count)
- Specified by:
lpop
in interfaceJedisCommands
-
lpos
public Long lpos(String key, String element)
- Specified by:
lpos
in interfaceJedisCommands
-
lpos
public Long lpos(String key, String element, LPosParams params)
- Specified by:
lpos
in interfaceJedisCommands
-
lpos
public List<Long> lpos(String key, String element, LPosParams params, long count)
- Specified by:
lpos
in interfaceJedisCommands
-
rpop
public String rpop(String key)
- Specified by:
rpop
in interfaceJedisCommands
-
rpop
public List<String> rpop(String key, int count)
- Specified by:
rpop
in interfaceJedisCommands
-
sadd
public Long sadd(String key, String... members)
- Specified by:
sadd
in interfaceJedisCommands
-
smembers
public Set<String> smembers(String key)
- Specified by:
smembers
in interfaceJedisCommands
-
srem
public Long srem(String key, String... members)
- Specified by:
srem
in interfaceJedisCommands
-
spop
public String spop(String key)
- Specified by:
spop
in interfaceJedisCommands
-
spop
public Set<String> spop(String key, long count)
- Specified by:
spop
in interfaceJedisCommands
-
scard
public Long scard(String key)
- Specified by:
scard
in interfaceJedisCommands
-
sismember
public Boolean sismember(String key, String member)
- Specified by:
sismember
in interfaceJedisCommands
-
smismember
public List<Boolean> smismember(String key, String... members)
- Specified by:
smismember
in interfaceJedisCommands
-
srandmember
public String srandmember(String key)
- Specified by:
srandmember
in interfaceJedisCommands
-
srandmember
public List<String> srandmember(String key, int count)
- Specified by:
srandmember
in interfaceJedisCommands
-
zadd
public Long zadd(String key, double score, String member)
- Specified by:
zadd
in interfaceJedisCommands
-
zadd
public Long zadd(String key, double score, String member, ZAddParams params)
- Specified by:
zadd
in interfaceJedisCommands
-
zadd
public Long zadd(String key, Map<String,Double> scoreMembers)
- Specified by:
zadd
in interfaceJedisCommands
-
zadd
public Long zadd(String key, Map<String,Double> scoreMembers, ZAddParams params)
- Specified by:
zadd
in interfaceJedisCommands
-
zrange
public Set<String> zrange(String key, long start, long stop)
- Specified by:
zrange
in interfaceJedisCommands
-
zrem
public Long zrem(String key, String... members)
- Specified by:
zrem
in interfaceJedisCommands
-
zincrby
public Double zincrby(String key, double increment, String member)
- Specified by:
zincrby
in interfaceJedisCommands
-
zincrby
public Double zincrby(String key, double increment, String member, ZIncrByParams params)
- Specified by:
zincrby
in interfaceJedisCommands
-
zrank
public Long zrank(String key, String member)
- Specified by:
zrank
in interfaceJedisCommands
-
zrevrank
public Long zrevrank(String key, String member)
- Specified by:
zrevrank
in interfaceJedisCommands
-
zrevrange
public Set<String> zrevrange(String key, long start, long stop)
- Specified by:
zrevrange
in interfaceJedisCommands
-
zrangeWithScores
public Set<Tuple> zrangeWithScores(String key, long start, long stop)
- Specified by:
zrangeWithScores
in interfaceJedisCommands
-
zrevrangeWithScores
public Set<Tuple> zrevrangeWithScores(String key, long start, long stop)
- Specified by:
zrevrangeWithScores
in interfaceJedisCommands
-
zcard
public Long zcard(String key)
- Specified by:
zcard
in interfaceJedisCommands
-
zscore
public Double zscore(String key, String member)
- Specified by:
zscore
in interfaceJedisCommands
-
zmscore
public List<Double> zmscore(String key, String... members)
- Specified by:
zmscore
in interfaceJedisCommands
-
zpopmax
public Tuple zpopmax(String key)
- Specified by:
zpopmax
in interfaceJedisCommands
-
zpopmax
public Set<Tuple> zpopmax(String key, int count)
- Specified by:
zpopmax
in interfaceJedisCommands
-
zpopmin
public Tuple zpopmin(String key)
- Specified by:
zpopmin
in interfaceJedisCommands
-
zpopmin
public Set<Tuple> zpopmin(String key, int count)
- Specified by:
zpopmin
in interfaceJedisCommands
-
sort
public List<String> sort(String key)
- Specified by:
sort
in interfaceJedisCommands
-
sort
public List<String> sort(String key, SortingParams sortingParameters)
- Specified by:
sort
in interfaceJedisCommands
-
zcount
public Long zcount(String key, double min, double max)
- Specified by:
zcount
in interfaceJedisCommands
-
zcount
public Long zcount(String key, String min, String max)
- Specified by:
zcount
in interfaceJedisCommands
-
zrangeByScore
public Set<String> zrangeByScore(String key, double min, double max)
- Specified by:
zrangeByScore
in interfaceJedisCommands
-
zrevrangeByScore
public Set<String> zrevrangeByScore(String key, double max, double min)
- Specified by:
zrevrangeByScore
in interfaceJedisCommands
-
zrangeByScore
public Set<String> zrangeByScore(String key, double min, double max, int offset, int count)
- Specified by:
zrangeByScore
in interfaceJedisCommands
-
zrevrangeByScore
public Set<String> zrevrangeByScore(String key, double max, double min, int offset, int count)
- Specified by:
zrevrangeByScore
in interfaceJedisCommands
-
zrangeByScoreWithScores
public Set<Tuple> zrangeByScoreWithScores(String key, double min, double max)
- Specified by:
zrangeByScoreWithScores
in interfaceJedisCommands
-
zrevrangeByScoreWithScores
public Set<Tuple> zrevrangeByScoreWithScores(String key, double max, double min)
- Specified by:
zrevrangeByScoreWithScores
in interfaceJedisCommands
-
zrangeByScoreWithScores
public Set<Tuple> zrangeByScoreWithScores(String key, double min, double max, int offset, int count)
- Specified by:
zrangeByScoreWithScores
in interfaceJedisCommands
-
zrevrangeByScoreWithScores
public Set<Tuple> zrevrangeByScoreWithScores(String key, double max, double min, int offset, int count)
- Specified by:
zrevrangeByScoreWithScores
in interfaceJedisCommands
-
zrangeByScore
public Set<String> zrangeByScore(String key, String min, String max)
- Specified by:
zrangeByScore
in interfaceJedisCommands
-
zrevrangeByScore
public Set<String> zrevrangeByScore(String key, String max, String min)
- Specified by:
zrevrangeByScore
in interfaceJedisCommands
-
zrangeByScore
public Set<String> zrangeByScore(String key, String min, String max, int offset, int count)
- Specified by:
zrangeByScore
in interfaceJedisCommands
-
zrevrangeByScore
public Set<String> zrevrangeByScore(String key, String max, String min, int offset, int count)
- Specified by:
zrevrangeByScore
in interfaceJedisCommands
-
zrangeByScoreWithScores
public Set<Tuple> zrangeByScoreWithScores(String key, String min, String max)
- Specified by:
zrangeByScoreWithScores
in interfaceJedisCommands
-
zrevrangeByScoreWithScores
public Set<Tuple> zrevrangeByScoreWithScores(String key, String max, String min)
- Specified by:
zrevrangeByScoreWithScores
in interfaceJedisCommands
-
zrangeByScoreWithScores
public Set<Tuple> zrangeByScoreWithScores(String key, String min, String max, int offset, int count)
- Specified by:
zrangeByScoreWithScores
in interfaceJedisCommands
-
zrevrangeByScoreWithScores
public Set<Tuple> zrevrangeByScoreWithScores(String key, String max, String min, int offset, int count)
- Specified by:
zrevrangeByScoreWithScores
in interfaceJedisCommands
-
zremrangeByRank
public Long zremrangeByRank(String key, long start, long stop)
- Specified by:
zremrangeByRank
in interfaceJedisCommands
-
zremrangeByScore
public Long zremrangeByScore(String key, double min, double max)
- Specified by:
zremrangeByScore
in interfaceJedisCommands
-
zremrangeByScore
public Long zremrangeByScore(String key, String min, String max)
- Specified by:
zremrangeByScore
in interfaceJedisCommands
-
zlexcount
public Long zlexcount(String key, String min, String max)
- Specified by:
zlexcount
in interfaceJedisCommands
-
zrangeByLex
public Set<String> zrangeByLex(String key, String min, String max)
- Specified by:
zrangeByLex
in interfaceJedisCommands
-
zrangeByLex
public Set<String> zrangeByLex(String key, String min, String max, int offset, int count)
- Specified by:
zrangeByLex
in interfaceJedisCommands
-
zrevrangeByLex
public Set<String> zrevrangeByLex(String key, String max, String min)
- Specified by:
zrevrangeByLex
in interfaceJedisCommands
-
zrevrangeByLex
public Set<String> zrevrangeByLex(String key, String max, String min, int offset, int count)
- Specified by:
zrevrangeByLex
in interfaceJedisCommands
-
zremrangeByLex
public Long zremrangeByLex(String key, String min, String max)
- Specified by:
zremrangeByLex
in interfaceJedisCommands
-
linsert
public Long linsert(String key, ListPosition where, String pivot, String value)
- Specified by:
linsert
in interfaceJedisCommands
-
bitcount
public Long bitcount(String key)
- Specified by:
bitcount
in interfaceJedisCommands
-
bitcount
public Long bitcount(String key, long start, long end)
- Specified by:
bitcount
in interfaceJedisCommands
-
bitpos
public Long bitpos(String key, boolean value)
- Specified by:
bitpos
in interfaceJedisCommands
-
bitpos
public Long bitpos(String key, boolean value, BitPosParams params)
- Specified by:
bitpos
in interfaceJedisCommands
-
hscan
public ScanResult<Map.Entry<String,String>> hscan(String key, String cursor)
- Specified by:
hscan
in interfaceJedisCommands
-
hscan
public ScanResult<Map.Entry<String,String>> hscan(String key, String cursor, ScanParams params)
- Specified by:
hscan
in interfaceJedisCommands
-
sscan
public ScanResult<String> sscan(String key, String cursor)
- Specified by:
sscan
in interfaceJedisCommands
-
zscan
public ScanResult<Tuple> zscan(String key, String cursor)
- Specified by:
zscan
in interfaceJedisCommands
-
zscan
public ScanResult<Tuple> zscan(String key, String cursor, ScanParams params)
- Specified by:
zscan
in interfaceJedisCommands
-
sscan
public ScanResult<String> sscan(String key, String cursor, ScanParams params)
- Specified by:
sscan
in interfaceJedisCommands
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
setDataSource
public void setDataSource(ShardedJedisPool shardedJedisPool)
-
resetState
public void resetState()
-
pfadd
public Long pfadd(String key, String... elements)
- Specified by:
pfadd
in interfaceJedisCommands
-
pfcount
public long pfcount(String key)
- Specified by:
pfcount
in interfaceJedisCommands
-
touch
public Long touch(String key)
- Specified by:
touch
in interfaceJedisCommands
-
geoadd
public Long geoadd(String key, double longitude, double latitude, String member)
- Specified by:
geoadd
in interfaceJedisCommands
-
geoadd
public Long geoadd(String key, Map<String,GeoCoordinate> memberCoordinateMap)
- Specified by:
geoadd
in interfaceJedisCommands
-
geodist
public Double geodist(String key, String member1, String member2)
- Specified by:
geodist
in interfaceJedisCommands
-
geodist
public Double geodist(String key, String member1, String member2, GeoUnit unit)
- Specified by:
geodist
in interfaceJedisCommands
-
geohash
public List<String> geohash(String key, String... members)
- Specified by:
geohash
in interfaceJedisCommands
-
geopos
public List<GeoCoordinate> geopos(String key, String... members)
- Specified by:
geopos
in interfaceJedisCommands
-
georadius
public List<GeoRadiusResponse> georadius(String key, double longitude, double latitude, double radius, GeoUnit unit)
- Specified by:
georadius
in interfaceJedisCommands
-
georadiusReadonly
public List<GeoRadiusResponse> georadiusReadonly(String key, double longitude, double latitude, double radius, GeoUnit unit)
- Specified by:
georadiusReadonly
in interfaceJedisCommands
-
georadius
public List<GeoRadiusResponse> georadius(String key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param)
- Specified by:
georadius
in interfaceJedisCommands
-
georadiusReadonly
public List<GeoRadiusResponse> georadiusReadonly(String key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param)
- Specified by:
georadiusReadonly
in interfaceJedisCommands
-
georadiusByMember
public List<GeoRadiusResponse> georadiusByMember(String key, String member, double radius, GeoUnit unit)
- Specified by:
georadiusByMember
in interfaceJedisCommands
-
georadiusByMemberReadonly
public List<GeoRadiusResponse> georadiusByMemberReadonly(String key, String member, double radius, GeoUnit unit)
- Specified by:
georadiusByMemberReadonly
in interfaceJedisCommands
-
georadiusByMember
public List<GeoRadiusResponse> georadiusByMember(String key, String member, double radius, GeoUnit unit, GeoRadiusParam param)
- Specified by:
georadiusByMember
in interfaceJedisCommands
-
georadiusByMemberReadonly
public List<GeoRadiusResponse> georadiusByMemberReadonly(String key, String member, double radius, GeoUnit unit, GeoRadiusParam param)
- Specified by:
georadiusByMemberReadonly
in interfaceJedisCommands
-
bitfield
public List<Long> bitfield(String key, String... arguments)
Description copied from interface:JedisCommands
Executes BITFIELD Redis command- Specified by:
bitfield
in interfaceJedisCommands
- Returns:
-
bitfieldReadonly
public List<Long> bitfieldReadonly(String key, String... arguments)
- Specified by:
bitfieldReadonly
in interfaceJedisCommands
-
hstrlen
public Long hstrlen(String key, String field)
Description copied from interface:JedisCommands
Used for HSTRLEN Redis command- Specified by:
hstrlen
in interfaceJedisCommands
- Returns:
- length of the value for key
-
xadd
public StreamEntryID xadd(String key, StreamEntryID id, Map<String,String> hash)
Description copied from interface:JedisCommands
XADD key ID field string [field string ...]- Specified by:
xadd
in interfaceJedisCommands
- Returns:
- the ID of the added entry
-
xadd
public StreamEntryID xadd(String key, StreamEntryID id, Map<String,String> hash, long maxLen, boolean approximateLength)
Description copied from interface:JedisCommands
XADD key MAXLEN ~ LEN ID field string [field string ...]- Specified by:
xadd
in interfaceJedisCommands
- Returns:
-
xlen
public Long xlen(String key)
Description copied from interface:JedisCommands
XLEN key- Specified by:
xlen
in interfaceJedisCommands
- Returns:
-
xrange
public List<StreamEntry> xrange(String key, StreamEntryID start, StreamEntryID end, int count)
Description copied from interface:JedisCommands
XRANGE key start end [COUNT count]- Specified by:
xrange
in interfaceJedisCommands
start
- minimumStreamEntryID
for the retrieved range, passingnull
will indicate minimum ID possible in the streamend
- maximumStreamEntryID
for the retrieved range, passingnull
will indicate maximum ID possible in the streamcount
- maximum number of entries returned- Returns:
- The entries with IDs matching the specified range.
-
xack
public long xack(String key, String group, StreamEntryID... ids)
Description copied from interface:JedisCommands
XACK key group ID [ID ...]- Specified by:
xack
in interfaceJedisCommands
- Returns:
-
xgroupCreate
public String xgroupCreate(String key, String consumer, StreamEntryID id, boolean makeStream)
Description copied from interface:JedisCommands
XGROUP CREATE- Specified by:
xgroupCreate
in interfaceJedisCommands
- Returns:
-
xgroupSetID
public String xgroupSetID(String key, String groupname, StreamEntryID id)
Description copied from interface:JedisCommands
XGROUP SETID- Specified by:
xgroupSetID
in interfaceJedisCommands
- Returns:
-
xgroupDestroy
public long xgroupDestroy(String key, String groupname)
Description copied from interface:JedisCommands
XGROUP DESTROY- Specified by:
xgroupDestroy
in interfaceJedisCommands
- Returns:
-
xgroupDelConsumer
public Long xgroupDelConsumer(String key, String groupname, String consumername)
Description copied from interface:JedisCommands
XGROUP DELCONSUMER- Specified by:
xgroupDelConsumer
in interfaceJedisCommands
- Returns:
-
xdel
public long xdel(String key, StreamEntryID... ids)
Description copied from interface:JedisCommands
XDEL key ID [ID ...]- Specified by:
xdel
in interfaceJedisCommands
- Returns:
-
xtrim
public long xtrim(String key, long maxLen, boolean approximateLength)
Description copied from interface:JedisCommands
XTRIM key MAXLEN [~] count- Specified by:
xtrim
in interfaceJedisCommands
- Returns:
-
xrevrange
public List<StreamEntry> xrevrange(String key, StreamEntryID end, StreamEntryID start, int count)
Description copied from interface:JedisCommands
XREVRANGE key end start [COUNT] - Specified by:
xrevrange
in interfaceJedisCommands
end
- maximumStreamEntryID
for the retrieved range, passingnull
will indicate maximum ID possible in the streamstart
- minimumStreamEntryID
for the retrieved range, passingnull
will indicate minimum ID possible in the streamcount
- The entries with IDs matching the specified range.- Returns:
- the entries with IDs matching the specified range, from the higher ID to the lower ID matching.
-
xpending
public List<StreamPendingEntry> xpending(String key, String groupname, StreamEntryID start, StreamEntryID end, int count, String consumername)
Description copied from interface:JedisCommands
XPENDING key group [start end count] [consumer]- Specified by:
xpending
in interfaceJedisCommands
- Returns:
-
xclaim
public List<StreamEntry> xclaim(String key, String group, String consumername, long minIdleTime, long newIdleTime, int retries, boolean force, StreamEntryID... ids)
Description copied from interface:JedisCommands
XCLAIM[IDLE ] [TIME ] [RETRYCOUNT ] [FORCE] [JUSTID] - Specified by:
xclaim
in interfaceJedisCommands
-
xinfoStream
public StreamInfo xinfoStream(String key)
Description copied from interface:JedisCommands
Introspection command used in order to retrieve different information about the stream- Specified by:
xinfoStream
in interfaceJedisCommands
- Parameters:
key
- Stream name- Returns:
StreamInfo
that contains information about the stream
-
xinfoGroup
public List<StreamGroupInfo> xinfoGroup(String key)
Description copied from interface:JedisCommands
Introspection command used in order to retrieve different information about groups in the stream- Specified by:
xinfoGroup
in interfaceJedisCommands
- Parameters:
key
- Stream name- Returns:
- List of
StreamGroupInfo
containing information about groups
-
xinfoConsumers
public List<StreamConsumersInfo> xinfoConsumers(String key, String group)
Description copied from interface:JedisCommands
Introspection command used in order to retrieve different information about consumers in the group- Specified by:
xinfoConsumers
in interfaceJedisCommands
- Parameters:
key
- Stream namegroup
- Group name- Returns:
- List of
StreamConsumersInfo
containing information about consumers that belong to the the group
-
sendCommand
public Object sendCommand(ProtocolCommand cmd, String... args)
-
sendBlockingCommand
public Object sendBlockingCommand(ProtocolCommand cmd, String... args)
-
-