Package redis.clients.jedis.commands
Interface JedisCommands
-
- All Known Implementing Classes:
Jedis,ShardedJedis
public interface JedisCommandsCommon interface for sharded and non-sharded Jedis
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Longappend(String key, String value)Longbitcount(String key)Longbitcount(String key, long start, long end)List<Long>bitfield(String key, String... arguments)Executes BITFIELD Redis commandList<Long>bitfieldReadonly(String key, String... arguments)Longbitpos(String key, boolean value)Longbitpos(String key, boolean value, BitPosParams params)List<String>blpop(int timeout, String key)List<String>brpop(int timeout, String key)Longdecr(String key)LongdecrBy(String key, long decrement)Longdel(String key)byte[]dump(String key)Stringecho(String string)Booleanexists(String key)Longexpire(String key, int seconds)LongexpireAt(String key, long unixTime)Longgeoadd(String key, double longitude, double latitude, String member)Longgeoadd(String key, Map<String,GeoCoordinate> memberCoordinateMap)Doublegeodist(String key, String member1, String member2)Doublegeodist(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)Stringget(String key)Booleangetbit(String key, long offset)Stringgetrange(String key, long startOffset, long endOffset)StringgetSet(String key, String value)Longhdel(String key, String... field)Booleanhexists(String key, String field)Stringhget(String key, String field)Map<String,String>hgetAll(String key)LonghincrBy(String key, String field, long value)DoublehincrByFloat(String key, String field, double value)Set<String>hkeys(String key)Longhlen(String key)List<String>hmget(String key, String... fields)Stringhmset(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)Longhset(String key, String field, String value)Longhset(String key, Map<String,String> hash)Longhsetnx(String key, String field, String value)Longhstrlen(String key, String field)Used for HSTRLEN Redis commandList<String>hvals(String key)Longincr(String key)LongincrBy(String key, long increment)DoubleincrByFloat(String key, double increment)Stringlindex(String key, long index)Longlinsert(String key, ListPosition where, String pivot, String value)Longllen(String key)Stringlpop(String key)List<String>lpop(String key, int count)Longlpos(String key, String element)Longlpos(String key, String element, LPosParams params)List<Long>lpos(String key, String element, LPosParams params, long count)Longlpush(String key, String... string)Longlpushx(String key, String... string)List<String>lrange(String key, long start, long stop)Longlrem(String key, long count, String value)Stringlset(String key, long index, String value)Stringltrim(String key, long start, long stop)Longmove(String key, int dbIndex)Longpersist(String key)Longpexpire(String key, long milliseconds)LongpexpireAt(String key, long millisecondsTimestamp)Longpfadd(String key, String... elements)longpfcount(String key)Stringpsetex(String key, long milliseconds, String value)Longpttl(String key)Stringrestore(String key, int ttl, byte[] serializedValue)StringrestoreReplace(String key, int ttl, byte[] serializedValue)Stringrpop(String key)List<String>rpop(String key, int count)Longrpush(String key, String... string)Longrpushx(String key, String... string)Longsadd(String key, String... member)Longscard(String key)Stringset(String key, String value)Stringset(String key, String value, SetParams params)Booleansetbit(String key, long offset, boolean value)Booleansetbit(String key, long offset, String value)Stringsetex(String key, int seconds, String value)Longsetnx(String key, String value)Longsetrange(String key, long offset, String value)Booleansismember(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)Stringspop(String key)Set<String>spop(String key, long count)Stringsrandmember(String key)List<String>srandmember(String key, int count)Longsrem(String key, String... member)ScanResult<String>sscan(String key, String cursor)ScanResult<String>sscan(String key, String cursor, ScanParams params)Longstrlen(String key)Stringsubstr(String key, int start, int end)Longtouch(String key)Longttl(String key)Stringtype(String key)Longunlink(String key)longxack(String key, String group, StreamEntryID... ids)XACK key group ID [ID ...]StreamEntryIDxadd(String key, StreamEntryID id, Map<String,String> hash)XADD key ID field string [field string ...]StreamEntryIDxadd(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] longxdel(String key, StreamEntryID... ids)XDEL key ID [ID ...]StringxgroupCreate(String key, String groupname, StreamEntryID id, boolean makeStream)XGROUP CREATELongxgroupDelConsumer(String key, String groupname, String consumername)XGROUP DELCONSUMERlongxgroupDestroy(String key, String groupname)XGROUP DESTROYStringxgroupSetID(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 streamStreamInfoxinfoStream(String key)Introspection command used in order to retrieve different information about the streamLongxlen(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] longxtrim(String key, long maxLen, boolean approximate)XTRIM key MAXLEN [~] countLongzadd(String key, double score, String member)Longzadd(String key, double score, String member, ZAddParams params)Longzadd(String key, Map<String,Double> scoreMembers)Longzadd(String key, Map<String,Double> scoreMembers, ZAddParams params)Longzcard(String key)Longzcount(String key, double min, double max)Longzcount(String key, String min, String max)Doublezincrby(String key, double increment, String member)Doublezincrby(String key, double increment, String member, ZIncrByParams params)Longzlexcount(String key, String min, String max)List<Double>zmscore(String key, String... members)Tuplezpopmax(String key)Set<Tuple>zpopmax(String key, int count)Tuplezpopmin(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)Longzrank(String key, String member)Longzrem(String key, String... members)LongzremrangeByLex(String key, String min, String max)LongzremrangeByRank(String key, long start, long stop)LongzremrangeByScore(String key, double min, double max)LongzremrangeByScore(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)Longzrevrank(String key, String member)ScanResult<Tuple>zscan(String key, String cursor)ScanResult<Tuple>zscan(String key, String cursor, ScanParams params)Doublezscore(String key, String member)
-
-
-
Method Detail
-
dump
byte[] dump(String key)
-
lpos
Long lpos(String key, String element, LPosParams params)
-
lpos
List<Long> lpos(String key, String element, LPosParams params, long count)
-
zadd
Long zadd(String key, double score, String member, ZAddParams params)
-
zincrby
Double zincrby(String key, double increment, String member, ZIncrByParams params)
-
sort
List<String> sort(String key, SortingParams sortingParameters)
-
zrevrangeByScore
Set<String> zrevrangeByScore(String key, double max, double min, int offset, int count)
-
zrevrangeByScoreWithScores
Set<Tuple> zrevrangeByScoreWithScores(String key, double max, double min)
-
zrangeByScoreWithScores
Set<Tuple> zrangeByScoreWithScores(String key, double min, double max, int offset, int count)
-
zrevrangeByScore
Set<String> zrevrangeByScore(String key, String max, String min, int offset, int count)
-
zrevrangeByScoreWithScores
Set<Tuple> zrevrangeByScoreWithScores(String key, String max, String min)
-
zrangeByScoreWithScores
Set<Tuple> zrangeByScoreWithScores(String key, String min, String max, int offset, int count)
-
zrevrangeByScoreWithScores
Set<Tuple> zrevrangeByScoreWithScores(String key, double max, double min, int offset, int count)
-
zrevrangeByScoreWithScores
Set<Tuple> zrevrangeByScoreWithScores(String key, String max, String min, int offset, int count)
-
zrevrangeByLex
Set<String> zrevrangeByLex(String key, String max, String min, int offset, int count)
-
linsert
Long linsert(String key, ListPosition where, String pivot, String value)
-
bitpos
Long bitpos(String key, boolean value, BitPosParams params)
-
hscan
ScanResult<Map.Entry<String,String>> hscan(String key, String cursor, ScanParams params)
-
sscan
ScanResult<String> sscan(String key, String cursor)
-
zscan
ScanResult<Tuple> zscan(String key, String cursor)
-
zscan
ScanResult<Tuple> zscan(String key, String cursor, ScanParams params)
-
sscan
ScanResult<String> sscan(String key, String cursor, ScanParams params)
-
pfcount
long pfcount(String key)
-
geoadd
Long geoadd(String key, Map<String,GeoCoordinate> memberCoordinateMap)
-
geopos
List<GeoCoordinate> geopos(String key, String... members)
-
georadius
List<GeoRadiusResponse> georadius(String key, double longitude, double latitude, double radius, GeoUnit unit)
-
georadiusReadonly
List<GeoRadiusResponse> georadiusReadonly(String key, double longitude, double latitude, double radius, GeoUnit unit)
-
georadius
List<GeoRadiusResponse> georadius(String key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param)
-
georadiusReadonly
List<GeoRadiusResponse> georadiusReadonly(String key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusParam param)
-
georadiusByMember
List<GeoRadiusResponse> georadiusByMember(String key, String member, double radius, GeoUnit unit)
-
georadiusByMemberReadonly
List<GeoRadiusResponse> georadiusByMemberReadonly(String key, String member, double radius, GeoUnit unit)
-
georadiusByMember
List<GeoRadiusResponse> georadiusByMember(String key, String member, double radius, GeoUnit unit, GeoRadiusParam param)
-
georadiusByMemberReadonly
List<GeoRadiusResponse> georadiusByMemberReadonly(String key, String member, double radius, GeoUnit unit, GeoRadiusParam param)
-
bitfield
List<Long> bitfield(String key, String... arguments)
Executes BITFIELD Redis command- Parameters:
key-arguments-- Returns:
-
hstrlen
Long hstrlen(String key, String field)
Used for HSTRLEN Redis command- Parameters:
key-field-- Returns:
- length of the value for key
-
xadd
StreamEntryID xadd(String key, StreamEntryID id, Map<String,String> hash)
XADD key ID field string [field string ...]- Parameters:
key-id-hash-- Returns:
- the ID of the added entry
-
xadd
StreamEntryID xadd(String key, StreamEntryID id, Map<String,String> hash, long maxLen, boolean approximateLength)
XADD key MAXLEN ~ LEN ID field string [field string ...]- Parameters:
key-id-hash-maxLen-approximateLength-- Returns:
-
xrange
List<StreamEntry> xrange(String key, StreamEntryID start, StreamEntryID end, int count)
XRANGE key start end [COUNT count]- Parameters:
key-start- minimumStreamEntryIDfor the retrieved range, passingnullwill indicate minimum ID possible in the streamend- maximumStreamEntryIDfor the retrieved range, passingnullwill indicate maximum ID possible in the streamcount- maximum number of entries returned- Returns:
- The entries with IDs matching the specified range.
-
xrevrange
List<StreamEntry> xrevrange(String key, StreamEntryID end, StreamEntryID start, int count)
XREVRANGE key end start [COUNT] - Parameters:
key-start- minimumStreamEntryIDfor the retrieved range, passingnullwill indicate minimum ID possible in the streamend- maximumStreamEntryIDfor the retrieved range, passingnullwill indicate maximum 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.
-
xack
long xack(String key, String group, StreamEntryID... ids)
XACK key group ID [ID ...]- Parameters:
key-group-ids-- Returns:
-
xgroupCreate
String xgroupCreate(String key, String groupname, StreamEntryID id, boolean makeStream)
XGROUP CREATE- Parameters:
key-groupname-id-makeStream-- Returns:
-
xgroupSetID
String xgroupSetID(String key, String groupname, StreamEntryID id)
XGROUP SETID- Parameters:
key-groupname-id-- Returns:
-
xgroupDestroy
long xgroupDestroy(String key, String groupname)
XGROUP DESTROY- Parameters:
key-groupname-- Returns:
-
xgroupDelConsumer
Long xgroupDelConsumer(String key, String groupname, String consumername)
XGROUP DELCONSUMER- Parameters:
key-groupname-consumername-- Returns:
-
xpending
List<StreamPendingEntry> xpending(String key, String groupname, StreamEntryID start, StreamEntryID end, int count, String consumername)
XPENDING key group [start end count] [consumer]- Parameters:
key-groupname-start-end-count-consumername-- Returns:
-
xdel
long xdel(String key, StreamEntryID... ids)
XDEL key ID [ID ...]- Parameters:
key-ids-- Returns:
-
xtrim
long xtrim(String key, long maxLen, boolean approximate)
XTRIM key MAXLEN [~] count- Parameters:
key-maxLen-approximate-- Returns:
-
xclaim
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]
-
xinfoStream
StreamInfo xinfoStream(String key)
Introspection command used in order to retrieve different information about the stream- Parameters:
key- Stream name- Returns:
StreamInfothat contains information about the stream
-
xinfoGroup
List<StreamGroupInfo> xinfoGroup(String key)
Introspection command used in order to retrieve different information about groups in the stream- Parameters:
key- Stream name- Returns:
- List of
StreamGroupInfocontaining information about groups
-
xinfoConsumers
List<StreamConsumersInfo> xinfoConsumers(String key, String group)
Introspection command used in order to retrieve different information about consumers in the group- Parameters:
key- Stream namegroup- Group name- Returns:
- List of
StreamConsumersInfocontaining information about consumers that belong to the the group
-
-