public interface StringRedisConnection extends RedisConnection
RedisConnection
that accepts and returns String
s instead of byte arrays.
Uses a RedisSerializer
underneath to perform the conversion.RedisCallback
,
RedisSerializer
,
StringRedisTemplate
Modifier and Type | Interface and Description |
---|---|
static interface |
StringRedisConnection.StringTuple
String-friendly ZSet tuple.
|
RedisStringCommands.BitOperation, RedisStringCommands.SetOption
RedisListCommands.Direction, RedisListCommands.Position
RedisZSetCommands.Aggregate, RedisZSetCommands.Limit, RedisZSetCommands.Range, RedisZSetCommands.Tuple, RedisZSetCommands.Weights, RedisZSetCommands.ZAddArgs
RedisServerCommands.FlushOption, RedisServerCommands.MigrateOption, RedisServerCommands.ShutdownOption
RedisStreamCommands.XAddOptions, RedisStreamCommands.XClaimOptions, RedisStreamCommands.XPendingOptions
RedisGeoCommands.DistanceUnit, RedisGeoCommands.GeoCommandArgs, RedisGeoCommands.GeoLocation<T>, RedisGeoCommands.GeoRadiusCommandArgs, RedisGeoCommands.GeoSearchCommandArgs, RedisGeoCommands.GeoSearchStoreCommandArgs
Modifier and Type | Method and Description |
---|---|
Long |
append(String key,
String value)
Append a
value to key . |
Long |
bitCount(String key)
Count the number of set bits (population counting) in value stored at
key . |
Long |
bitCount(String key,
long start,
long end)
Count the number of set bits (population counting) of value stored at
key between start and
end . |
List<Long> |
bitfield(String key,
BitFieldSubCommands command)
Get / Manipulate specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset stored
at a given
key . |
Long |
bitOp(RedisStringCommands.BitOperation op,
String destination,
String... keys)
Perform bitwise operations between strings.
|
default Long |
bitPos(String key,
boolean bit)
Return the position of the first bit set to given
bit in a string. |
Long |
bitPos(String key,
boolean bit,
Range<Long> range)
Return the position of the first bit set to given
bit in a string. |
String |
bLMove(String sourceKey,
String destinationKey,
RedisListCommands.Direction from,
RedisListCommands.Direction to,
double timeout)
Atomically returns and removes the first/last element (head/tail depending on the
from argument) of the
list stored at sourceKey , and pushes the element at the first/last element (head/tail depending on the
to argument) of the list stored at destinationKey . |
List<String> |
bLPop(int timeout,
String... keys)
Removes and returns first element from lists stored at
keys (see: RedisListCommands.lPop(byte[]) ). |
List<String> |
bRPop(int timeout,
String... keys)
Removes and returns last element from lists stored at
keys (see: RedisListCommands.rPop(byte[]) ). |
String |
bRPopLPush(int timeout,
String srcKey,
String dstKey)
Remove the last element from list at
srcKey , append it to dstKey and return its value (see
RedisListCommands.rPopLPush(byte[], byte[]) ). |
StringRedisConnection.StringTuple |
bZPopMax(String key,
long timeout,
TimeUnit unit)
Remove and return the value with its score having the highest score from sorted set at
key . |
StringRedisConnection.StringTuple |
bZPopMin(String key,
long timeout,
TimeUnit unit)
Remove and return the value with its score having the lowest score from sorted set at
key . |
Boolean |
copy(String sourceKey,
String targetKey,
boolean replace)
Copy given
sourceKey to targetKey . |
Long |
decr(String key)
Decrement an integer value stored as string value of
key by 1. |
Long |
decrBy(String key,
long value)
Decrement an integer value stored as string value of
key by value . |
Long |
del(String... keys)
Delete given
keys . |
String |
echo(String message)
Returns
message via server roundtrip. |
ValueEncoding |
encodingOf(String key)
Get the type of internal representation used for storing the value at the given
key . |
static RecordId[] |
entryIds(String... entryIds) |
<T> T |
eval(String script,
ReturnType returnType,
int numKeys,
String... keysAndArgs)
Evaluate given
script . |
<T> T |
evalSha(String scriptSha,
ReturnType returnType,
int numKeys,
String... keysAndArgs)
Evaluate given
scriptSha . |
Object |
execute(String command)
'Native' or 'raw' execution of the given command along-side the given arguments.
|
Object |
execute(String command,
String... args)
'Native' or 'raw' execution of the given command along-side the given arguments.
|
Long |
exists(String... keys)
Count how many of the given
keys exist. |
Boolean |
exists(String key)
Determine if given
key exists. |
Boolean |
expire(String key,
long seconds)
Set time to live for given
key in seconds. |
Boolean |
expireAt(String key,
long unixTime)
Set the expiration for given
key as a UNIX timestamp. |
Long |
geoAdd(String key,
Iterable<RedisGeoCommands.GeoLocation<String>> locations)
Add
GeoLocation s to key |
Long |
geoAdd(String key,
Map<String,Point> memberCoordinateMap)
|
Long |
geoAdd(String key,
Point point,
String member)
Add
Point with given member name to key. |
Long |
geoAdd(String key,
RedisGeoCommands.GeoLocation<String> location)
Add
GeoLocation to key. |
Distance |
geoDist(String key,
String member1,
String member2)
Get the
Distance between member1 and member2. |
Distance |
geoDist(String key,
String member1,
String member2,
Metric metric)
|
List<String> |
geoHash(String key,
String... members)
Get geohash representation of the position for one or more members.
|
List<Point> |
geoPos(String key,
String... members)
Get the
Point representation of positions for one or more members. |
GeoResults<RedisGeoCommands.GeoLocation<String>> |
geoRadius(String key,
Circle within)
Get the members within the boundaries of a given
Circle . |
GeoResults<RedisGeoCommands.GeoLocation<String>> |
geoRadius(String key,
Circle within,
RedisGeoCommands.GeoRadiusCommandArgs args)
Get the members within the boundaries of a given
Circle applying GeoRadiusCommandArgs . |
GeoResults<RedisGeoCommands.GeoLocation<String>> |
geoRadiusByMember(String key,
String member,
Distance radius)
Get the members within the circle defined by the members coordinates and given
Distance . |
GeoResults<RedisGeoCommands.GeoLocation<String>> |
geoRadiusByMember(String key,
String member,
Distance radius,
RedisGeoCommands.GeoRadiusCommandArgs args)
Get the members within the circle defined by the members coordinates and given
Distance and GeoRadiusCommandArgs . |
GeoResults<RedisGeoCommands.GeoLocation<String>> |
geoRadiusByMember(String key,
String member,
double radius)
Get the members within the circle defined by the members coordinates and given
radius.
|
Long |
geoRemove(String key,
String... members)
Remove the members.
|
GeoResults<RedisGeoCommands.GeoLocation<String>> |
geoSearch(String key,
GeoReference<String> reference,
GeoShape predicate,
RedisGeoCommands.GeoSearchCommandArgs args)
Return the members of a geo set which are within the borders of the area specified by a given
shape . |
Long |
geoSearchStore(String destKey,
String key,
GeoReference<String> reference,
GeoShape predicate,
RedisGeoCommands.GeoSearchStoreCommandArgs args)
Query the members of a geo set which are within the borders of the area specified by a given
shape
and store the result at destKey . |
String |
get(String key)
Get the value of
key . |
Boolean |
getBit(String key,
long offset)
Get the bit value at
offset of value at key . |
List<RedisClientInfo> |
getClientList()
Request information and statistics about connected clients.
|
String |
getDel(String key)
Return the value at
key and delete the key. |
String |
getEx(String key,
Expiration expiration)
Return the value at
key and expire the key by applying Expiration . |
String |
getRange(String key,
long start,
long end)
Get a substring of value of
key between start and end . |
String |
getSet(String key,
String value)
Set
value of key and return its old value. |
Long |
hDel(String key,
String... fields)
Delete given hash
fields . |
Boolean |
hExists(String key,
String field)
Determine if given hash
field exists. |
String |
hGet(String key,
String field)
Get value for given
field from hash at key . |
Map<String,String> |
hGetAll(String key)
Get entire hash stored at
key . |
Double |
hIncrBy(String key,
String field,
double delta)
Increment
value of a hash field by the given delta . |
Long |
hIncrBy(String key,
String field,
long delta)
Increment
value of a hash field by the given delta . |
Set<String> |
hKeys(String key)
Get key set (fields) of hash at
key . |
Long |
hLen(String key)
Get size of hash at
key . |
List<String> |
hMGet(String key,
String... fields)
Get values for given
fields from hash at key . |
void |
hMSet(String key,
Map<String,String> hashes)
Set multiple hash fields to multiple values using data provided in
hashes |
String |
hRandField(String key)
Return a random field from the hash value stored at
key . |
List<String> |
hRandField(String key,
long count)
Return a random field from the hash value stored at
key . |
Map.Entry<String,String> |
hRandFieldWithValues(String key)
Return a random field from the hash value stored at
key . |
List<Map.Entry<String,String>> |
hRandFieldWithValues(String key,
long count)
Return a random field from the hash value stored at
key . |
Cursor<Map.Entry<String,String>> |
hScan(String key,
ScanOptions options)
Use a
Cursor to iterate over entries in hash at key . |
Boolean |
hSet(String key,
String field,
String value)
Set the
value of a hash field . |
Boolean |
hSetNX(String key,
String field,
String value)
Set the
value of a hash field only if field does not exist. |
Long |
hStrLen(String key,
String field)
Returns the length of the value associated with
field in the hash stored at key . |
List<String> |
hVals(String key)
Get entry set (values) of hash at
field . |
Duration |
idletime(String key)
Get the
Duration since the object stored at the given key is idle. |
Long |
incr(String key)
Increment an integer value stored as string value of
key by 1. |
Double |
incrBy(String key,
double value)
Increment a floating point number value of
key by delta . |
Long |
incrBy(String key,
long value)
Increment an integer value stored of
key by delta . |
Collection<String> |
keys(String pattern)
Find all keys matching the given
pattern . |
String |
lIndex(String key,
long index)
Get element at
index form list at key . |
Long |
lInsert(String key,
RedisListCommands.Position where,
String pivot,
String value)
Insert
value Position#BEFORE or Position#AFTER existing pivot for key . |
Long |
lLen(String key)
Get the size of list stored at
key . |
String |
lMove(String sourceKey,
String destinationKey,
RedisListCommands.Direction from,
RedisListCommands.Direction to)
Atomically returns and removes the first/last element (head/tail depending on the
from argument) of the
list stored at sourceKey , and pushes the element at the first/last element (head/tail depending on the
to argument) of the list stored at destinationKey . |
String |
lPop(String key)
Removes and returns first element in list stored at
key . |
List<String> |
lPop(String key,
long count)
Removes and returns first elements in list stored at
key . |
default Long |
lPos(String key,
String element)
Returns the index of matching elements inside the list stored at given key.
|
List<Long> |
lPos(String key,
String element,
Integer rank,
Integer count)
Returns the index of matching elements inside the list stored at given key.
|
Long |
lPush(String key,
String... values)
Prepend
values to key . |
Long |
lPushX(String key,
String value)
Prepend
values to key only if the list exists. |
List<String> |
lRange(String key,
long start,
long end)
Get elements between
start and end from list at key . |
Long |
lRem(String key,
long count,
String value)
Removes the first
count occurrences of value from the list stored at key . |
void |
lSet(String key,
long index,
String value)
Set the
value list element at index . |
void |
lTrim(String key,
long start,
long end)
Trim list at
key to elements between start and end . |
List<String> |
mGet(String... keys)
Get multiple
keys . |
Boolean |
move(String key,
int dbIndex)
Move given
key to database with index . |
Boolean |
mSetNXString(Map<String,String> tuple)
Set multiple keys to multiple values using key-value pairs provided in
tuple only if the provided key does
not exist. |
Boolean |
mSetString(Map<String,String> tuple)
Set multiple keys to multiple values using key-value pairs provided in
tuple . |
Boolean |
persist(String key)
Remove the expiration from given
key . |
Boolean |
pExpire(String key,
long millis)
Set time to live for given
key in milliseconds. |
Boolean |
pExpireAt(String key,
long unixTimeInMillis)
Set the expiration for given
key as a UNIX timestamp in milliseconds. |
Long |
pfAdd(String key,
String... values)
Adds given values to the HyperLogLog stored at given key.
|
Long |
pfCount(String... keys)
Return the approximated cardinality of the structures observed by the HyperLogLog at key(s).
|
void |
pfMerge(String destinationKey,
String... sourceKeys)
Merge N different HyperLogLogs at sourceKeys into a single destinationKey.
|
Boolean |
pSetEx(String key,
long milliseconds,
String value)
Set the
value and expiration in milliseconds for key . |
void |
pSubscribe(MessageListener listener,
String... patterns)
Subscribes the connection to all channels matching the given patterns.
|
Long |
pTtl(String key)
Get the precise time to live for
key in milliseconds. |
Long |
pTtl(String key,
TimeUnit timeUnit)
Get the precise time to live for
key in and convert it to the given TimeUnit . |
Long |
publish(String channel,
String message)
Publishes the given message to the given channel.
|
Long |
refcount(String key)
Get the number of references of the value associated with the specified
key . |
void |
rename(String oldKey,
String newKey)
Rename key
oldKey to newKey . |
Boolean |
renameNX(String oldKey,
String newKey)
Rename key
oldKey to newKey only if newKey does not exist. |
String |
rPop(String key)
Removes and returns last element in list stored at
key . |
List<String> |
rPop(String key,
long count)
Removes and returns last elements in list stored at
key . |
String |
rPopLPush(String srcKey,
String dstKey)
Remove the last element from list at
srcKey , append it to dstKey and return its value. |
Long |
rPush(String key,
String... values)
Append
values to key . |
Long |
rPushX(String key,
String value)
Append
values to key only if the list exists. |
Long |
sAdd(String key,
String... values)
Add given
values to set at key . |
Long |
sCard(String key)
Get size of set at
key . |
String |
scriptLoad(String script)
Load lua script into scripts cache, without executing it.
|
Set<String> |
sDiff(String... keys)
Diff all sets for given
keys . |
Long |
sDiffStore(String destKey,
String... keys)
Diff all sets for given
keys and store result in destKey . |
Boolean |
set(String key,
String value)
Set
value for key . |
Boolean |
set(String key,
String value,
Expiration expiration,
RedisStringCommands.SetOption option)
Set
value for key applying timeouts from expiration if set and inserting/updating values
depending on option . |
Boolean |
setBit(String key,
long offset,
boolean value)
Sets the bit at
offset in value stored at key . |
void |
setClientName(String name)
Assign given name to current connection.
|
Boolean |
setEx(String key,
long seconds,
String value)
Set the
value and expiration in seconds for key . |
Boolean |
setNX(String key,
String value)
Set
value for key , only if key does not exist. |
void |
setRange(String key,
String value,
long offset)
Overwrite parts of
key starting at the specified offset with given value . |
Set<String> |
sInter(String... keys)
Returns the members intersecting all given sets at
keys . |
Long |
sInterStore(String destKey,
String... keys)
Intersect all given sets at
keys and store result in destKey . |
Boolean |
sIsMember(String key,
String value)
Check if set at
key contains value . |
Set<String> |
sMembers(String key)
Get all elements of set at
key . |
List<Boolean> |
sMIsMember(String key,
String... values)
Check if set at
key contains one or more values . |
Boolean |
sMove(String srcKey,
String destKey,
String value)
Move
value from srcKey to destKey |
List<String> |
sort(String key,
SortParameters params)
Sort the elements for
key . |
Long |
sort(String key,
SortParameters params,
String storeKey)
Sort the elements for
key and store result in storeKey . |
String |
sPop(String key)
Remove and return a random member from set at
key . |
List<String> |
sPop(String key,
long count)
Remove and return
count random members from set at key . |
String |
sRandMember(String key)
Get random element from set at
key . |
List<String> |
sRandMember(String key,
long count)
Get
count random elements from set at key . |
Long |
sRem(String key,
String... values)
Remove given
values from set at key and return the number of removed elements. |
Cursor<String> |
sScan(String key,
ScanOptions options)
Use a
Cursor to iterate over elements in set at key . |
Long |
strLen(String key)
Get the length of the value stored at
key . |
void |
subscribe(MessageListener listener,
String... channels)
Subscribes the connection to the given channels.
|
Set<String> |
sUnion(String... keys)
Union all sets at given
keys . |
Long |
sUnionStore(String destKey,
String... keys)
Union all sets at given
keys and store result in destKey . |
Long |
touch(String... keys)
Alter the last access time of given
key(s) . |
Long |
ttl(String key)
Get the time to live for
key in seconds. |
Long |
ttl(String key,
TimeUnit timeUnit)
Get the time to live for
key in and convert it to the given TimeUnit . |
DataType |
type(String key)
Determine the type stored at
key . |
Long |
unlink(String... keys)
Unlink the
keys from the keyspace. |
Long |
xAck(String key,
String group,
RecordId... recordIds) |
default Long |
xAck(String key,
String group,
String... entryIds)
Acknowledge one or more record as processed.
|
default RecordId |
xAdd(String key,
Map<String,String> body)
Append a record to the stream
key . |
default RecordId |
xAdd(StringRecord record)
Append the given
StringRecord to the stream stored at Record.getStream() . |
RecordId |
xAdd(StringRecord record,
RedisStreamCommands.XAddOptions options)
Append the given
StringRecord to the stream stored at Record.getStream() . |
default List<StringRecord> |
xClaim(String key,
String group,
String newOwner,
Duration minIdleTime,
RecordId... recordIds)
Change the ownership of a pending message to the given new consumer.
|
List<StringRecord> |
xClaim(String key,
String group,
String newOwner,
RedisStreamCommands.XClaimOptions options)
Change the ownership of a pending message to the given new consumer.
|
List<RecordId> |
xClaimJustId(String key,
String group,
String newOwner,
RedisStreamCommands.XClaimOptions options)
Change the ownership of a pending message to the given new consumer without increasing the delivered
count.
|
Long |
xDel(String key,
RecordId... recordIds) |
default Long |
xDel(String key,
String... entryIds)
Removes the specified entries from the stream.
|
String |
xGroupCreate(String key,
ReadOffset readOffset,
String group)
Create a consumer group.
|
String |
xGroupCreate(String key,
ReadOffset readOffset,
String group,
boolean mkStream)
Create a consumer group.
|
Boolean |
xGroupDelConsumer(String key,
Consumer consumer)
Delete a consumer from a consumer group.
|
Boolean |
xGroupDestroy(String key,
String group)
Destroy a consumer group.
|
StreamInfo.XInfoStream |
xInfo(String key)
Obtain general information about the stream stored at the specified key.
|
StreamInfo.XInfoConsumers |
xInfoConsumers(String key,
String groupName)
Obtain information about every consumer in a specific consumer group for the stream stored at the
specified key.
|
StreamInfo.XInfoGroups |
xInfoGroups(String key)
Obtain information about consumer groups associated with the stream stored at the specified
key.
|
Long |
xLen(String key)
Get the length of a stream.
|
PendingMessagesSummary |
xPending(String key,
String groupName)
Obtain the
PendingMessagesSummary for a given consumer group. |
PendingMessages |
xPending(String key,
String groupName,
Range<String> range,
Long count)
|
PendingMessages |
xPending(String key,
String groupName,
RedisStreamCommands.XPendingOptions options)
Obtain detailed information about pending
messages applying given options . |
PendingMessages |
xPending(String key,
String groupName,
String consumerName,
Range<String> range,
Long count)
|
default List<StringRecord> |
xRange(String key,
Range<String> range)
Read records from a stream within a specific
Range . |
List<StringRecord> |
xRange(String key,
Range<String> range,
RedisZSetCommands.Limit limit)
Read records from a stream within a specific
Range applying a Limit . |
default List<StringRecord> |
xReadAsString(StreamOffset<String>... streams)
Read records from one or more
StreamOffset s. |
default List<StringRecord> |
xReadAsString(StreamOffset<String> stream)
Read records from one or more
StreamOffset s. |
List<StringRecord> |
xReadAsString(StreamReadOptions readOptions,
StreamOffset<String>... streams)
Read records from one or more
StreamOffset s. |
default List<StringRecord> |
xReadAsString(StreamReadOptions readOptions,
StreamOffset<String> stream)
Read records from one or more
StreamOffset s. |
default List<StringRecord> |
xReadGroupAsString(Consumer consumer,
StreamOffset<String>... streams)
Read records from one or more
StreamOffset s using a consumer group. |
default List<StringRecord> |
xReadGroupAsString(Consumer consumer,
StreamOffset<String> stream)
Read records from one or more
StreamOffset s using a consumer group. |
List<StringRecord> |
xReadGroupAsString(Consumer consumer,
StreamReadOptions readOptions,
StreamOffset<String>... streams)
Read records from one or more
StreamOffset s using a consumer group. |
default List<StringRecord> |
xReadGroupAsString(Consumer consumer,
StreamReadOptions readOptions,
StreamOffset<String> stream)
Read records from one or more
StreamOffset s using a consumer group. |
default List<StringRecord> |
xRevRange(String key,
Range<String> range)
Read records from a stream within a specific
Range in reverse order. |
List<StringRecord> |
xRevRange(String key,
Range<String> range,
RedisZSetCommands.Limit limit)
Read records from a stream within a specific
Range applying a Limit in reverse order. |
Long |
xTrim(String key,
long count)
Trims the stream to
count elements. |
Long |
xTrim(String key,
long count,
boolean approximateTrimming)
Trims the stream to
count elements. |
Boolean |
zAdd(String key,
double score,
String value)
Add
value to a sorted set at key , or update its score if it already exists. |
Boolean |
zAdd(String key,
double score,
String value,
RedisZSetCommands.ZAddArgs args)
Add the
value to a sorted set at key , or update its score depending on the given
args . |
Long |
zAdd(String key,
Set<StringRedisConnection.StringTuple> tuples)
Add
tuples to a sorted set at key , or update its score if it already exists. |
Long |
zAdd(String key,
Set<StringRedisConnection.StringTuple> tuples,
RedisZSetCommands.ZAddArgs args)
Add
tuples to a sorted set at key , or update its score depending on the given
args . |
Long |
zCard(String key)
Get the size of sorted set with
key . |
Long |
zCount(String key,
double min,
double max)
Count number of elements within sorted set with scores between
min and max . |
Set<String> |
zDiff(String... sets)
Diff sorted
sets . |
Long |
zDiffStore(String destKey,
String... sets)
Diff sorted
sets and store result in destination destKey . |
Set<StringRedisConnection.StringTuple> |
zDiffWithScores(String... sets)
Diff sorted
sets . |
Double |
zIncrBy(String key,
double increment,
String value)
Increment the score of element with
value in sorted set by increment . |
Set<String> |
zInter(String... sets)
Intersect sorted
sets . |
Long |
zInterStore(String destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
String... sets)
Intersect sorted
sets and store result in destination key . |
Long |
zInterStore(String destKey,
String... sets)
Intersect sorted
sets and store result in destination key . |
default Set<StringRedisConnection.StringTuple> |
zInterWithScores(RedisZSetCommands.Aggregate aggregate,
int[] weights,
String... sets)
Intersect sorted
sets . |
Set<StringRedisConnection.StringTuple> |
zInterWithScores(RedisZSetCommands.Aggregate aggregate,
RedisZSetCommands.Weights weights,
String... sets)
Intersect sorted
sets . |
Set<StringRedisConnection.StringTuple> |
zInterWithScores(String... sets)
Intersect sorted
sets . |
Long |
zLexCount(String key,
RedisZSetCommands.Range range)
Count number of elements within sorted set with value between
Range#min and Range#max applying
lexicographical ordering. |
List<Double> |
zMScore(String key,
String... values)
Get the scores of elements with
values from sorted set with key key . |
StringRedisConnection.StringTuple |
zPopMax(String key)
Remove and return the value with its score having the highest score from sorted set at
key . |
Set<StringRedisConnection.StringTuple> |
zPopMax(String key,
long count)
Remove and return
count values with their score having the highest score from sorted set at key . |
RedisZSetCommands.Tuple |
zPopMin(String key)
Remove and return the value with its score having the lowest score from sorted set at
key . |
Set<StringRedisConnection.StringTuple> |
zPopMin(String key,
long count)
Remove and return
count values with their score having the lowest score from sorted set at key . |
String |
zRandMember(String key)
Get random element from sorted set at
key . |
List<String> |
zRandMember(String key,
long count)
Get
count random elements from sorted set at key . |
StringRedisConnection.StringTuple |
zRandMemberWithScore(String key)
Get random element from sorted set at
key . |
List<StringRedisConnection.StringTuple> |
zRandMemberWithScores(String key,
long count)
Get
count random elements from sorted set at key . |
Set<String> |
zRange(String key,
long start,
long end)
Get elements between
start and end from sorted set. |
Set<String> |
zRangeByLex(String key)
Get all the elements in the sorted set at key in lexicographical ordering.
|
Set<String> |
zRangeByLex(String key,
RedisZSetCommands.Range range)
Get all the elements in
Range from the sorted set at key in lexicographical ordering. |
Set<String> |
zRangeByLex(String key,
RedisZSetCommands.Range range,
RedisZSetCommands.Limit limit)
Get all the elements in
Range from the sorted set at key in lexicographical ordering. |
Set<String> |
zRangeByScore(String key,
double min,
double max)
Get elements where score is between
min and max from sorted set. |
Set<String> |
zRangeByScore(String key,
double min,
double max,
long offset,
long count)
Get elements in range from
start to end where score is between min and max from
sorted set. |
Set<String> |
zRangeByScore(String key,
String min,
String max)
Get elements where score is between
min and max from sorted set. |
Set<String> |
zRangeByScore(String key,
String min,
String max,
long offset,
long count)
Get elements in range from
start to end where score is between min and max from
sorted set. |
Set<StringRedisConnection.StringTuple> |
zRangeByScoreWithScores(String key,
double min,
double max)
Get set of
Tuple s where score is between min and max from sorted set. |
Set<StringRedisConnection.StringTuple> |
zRangeByScoreWithScores(String key,
double min,
double max,
long offset,
long count)
Get set of
Tuple s in range from start to end where score is between min and
max from sorted set. |
Set<StringRedisConnection.StringTuple> |
zRangeWithScores(String key,
long start,
long end)
Get set of
Tuple s between start and end from sorted set. |
Long |
zRank(String key,
String value)
Determine the index of element with
value in a sorted set. |
Long |
zRem(String key,
String... values)
Remove
values from sorted set. |
Long |
zRemRange(String key,
long start,
long end)
Remove elements in range between
start and end from sorted set with key . |
Long |
zRemRangeByLex(String key,
RedisZSetCommands.Range range)
Remove all elements between the lexicographical
Range . |
Long |
zRemRangeByScore(String key,
double min,
double max)
Remove elements with scores between
min and max from sorted set with key . |
Set<String> |
zRevRange(String key,
long start,
long end)
Get elements in range from
start to end from sorted set ordered from high to low. |
default Set<String> |
zRevRangeByLex(String key)
Get all the elements in the sorted set at key in reversed lexicographical ordering.
|
default Set<String> |
zRevRangeByLex(String key,
RedisZSetCommands.Range range)
Get all the elements in
Range from the sorted set at key in reversed lexicographical ordering. |
Set<String> |
zRevRangeByLex(String key,
RedisZSetCommands.Range range,
RedisZSetCommands.Limit limit)
Get all the elements in
Range from the sorted set at key in reversed lexicographical ordering. |
Set<String> |
zRevRangeByScore(String key,
double min,
double max)
Get elements where score is between
min and max from sorted set ordered from high to low. |
Set<String> |
zRevRangeByScore(String key,
double min,
double max,
long offset,
long count)
Get elements in range from
start to end where score is between min and max from
sorted set ordered high -> low. |
Set<StringRedisConnection.StringTuple> |
zRevRangeByScoreWithScores(String key,
double min,
double max)
Get set of
Tuple where score is between min and max from sorted set ordered from high to
low. |
Set<StringRedisConnection.StringTuple> |
zRevRangeByScoreWithScores(String key,
double min,
double max,
long offset,
long count)
Get set of
Tuple in range from start to end where score is between min and
max from sorted set ordered high -> low. |
Set<StringRedisConnection.StringTuple> |
zRevRangeWithScores(String key,
long start,
long end)
Get set of
Tuple s in range from start to end from sorted set ordered from high to low. |
Long |
zRevRank(String key,
String value)
Determine the index of element with
value in a sorted set when scored high to low. |
Cursor<StringRedisConnection.StringTuple> |
zScan(String key,
ScanOptions options)
Use a
Cursor to iterate over elements in sorted set at key . |
Double |
zScore(String key,
String value)
Get the score of element with
value from sorted set with key key . |
Set<String> |
zUnion(String... sets)
Union sorted
sets . |
Long |
zUnionStore(String destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
String... sets)
Union sorted
sets and store result in destination key . |
Long |
zUnionStore(String destKey,
String... sets)
Union sorted
sets and store result in destination key . |
default Set<StringRedisConnection.StringTuple> |
zUnionWithScores(RedisZSetCommands.Aggregate aggregate,
int[] weights,
String... sets)
Union sorted
sets . |
Set<StringRedisConnection.StringTuple> |
zUnionWithScores(RedisZSetCommands.Aggregate aggregate,
RedisZSetCommands.Weights weights,
String... sets)
Union sorted
sets . |
Set<StringRedisConnection.StringTuple> |
zUnionWithScores(String... sets)
Union sorted
sets . |
close, closePipeline, geoCommands, getNativeConnection, getSentinelConnection, hashCommands, hyperLogLogCommands, isClosed, isPipelined, isQueueing, keyCommands, listCommands, openPipeline, scriptingCommands, serverCommands, setCommands, streamCommands, stringCommands, zSetCommands
execute
copy, del, dump, encodingOf, exists, exists, expire, expireAt, idletime, keys, move, persist, pExpire, pExpireAt, pTtl, pTtl, randomKey, refcount, rename, renameNX, restore, restore, scan, scan, sort, sort, touch, ttl, ttl, type, unlink
append, bitCount, bitCount, bitField, bitOp, bitPos, bitPos, decr, decrBy, get, getBit, getDel, getEx, getRange, getSet, incr, incrBy, incrBy, mGet, mSet, mSetNX, pSetEx, set, set, setBit, setEx, setNX, setRange, strLen
bLMove, bLPop, bRPop, bRPopLPush, lIndex, lInsert, lLen, lMove, lPop, lPop, lPos, lPos, lPush, lPushX, lRange, lRem, lSet, lTrim, rPop, rPop, rPopLPush, rPush, rPushX
sAdd, sCard, sDiff, sDiffStore, sInter, sInterStore, sIsMember, sMembers, sMIsMember, sMove, sPop, sPop, sRandMember, sRandMember, sRem, sScan, sUnion, sUnionStore
bZPopMax, bZPopMin, zAdd, zAdd, zAdd, zAdd, zCard, zCount, zCount, zDiff, zDiffStore, zDiffWithScores, zIncrBy, zInter, zInterStore, zInterStore, zInterStore, zInterWithScores, zInterWithScores, zInterWithScores, zLexCount, zMScore, zPopMax, zPopMax, zPopMin, zPopMin, zRandMember, zRandMember, zRandMemberWithScore, zRandMemberWithScore, zRange, zRangeByLex, zRangeByLex, zRangeByLex, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScoreWithScores, zRangeByScoreWithScores, zRangeByScoreWithScores, zRangeByScoreWithScores, zRangeWithScores, zRank, zRem, zRemRange, zRemRangeByLex, zRemRangeByScore, zRemRangeByScore, zRevRange, zRevRangeByLex, zRevRangeByLex, zRevRangeByLex, zRevRangeByScore, zRevRangeByScore, zRevRangeByScore, zRevRangeByScore, zRevRangeByScoreWithScores, zRevRangeByScoreWithScores, zRevRangeByScoreWithScores, zRevRangeByScoreWithScores, zRevRangeWithScores, zRevRank, zScan, zScore, zUnion, zUnionStore, zUnionStore, zUnionStore, zUnionWithScores, zUnionWithScores, zUnionWithScores
hDel, hExists, hGet, hGetAll, hIncrBy, hIncrBy, hKeys, hLen, hMGet, hMSet, hRandField, hRandField, hRandFieldWithValues, hRandFieldWithValues, hScan, hSet, hSetNX, hStrLen, hVals
discard, exec, multi, unwatch, watch
getSubscription, isSubscribed, pSubscribe, publish, subscribe
echo, ping, select
bgReWriteAof, bgSave, bgWriteAof, dbSize, flushAll, flushAll, flushDb, flushDb, getClientName, getConfig, info, info, killClient, lastSave, migrate, migrate, resetConfigStats, rewriteConfig, save, setClientName, setConfig, shutdown, shutdown, slaveOf, slaveOfNoOne, time, time
xAck, xAck, xAdd, xAdd, xAdd, xClaim, xClaim, xClaimJustId, xDel, xDel, xGroupCreate, xGroupCreate, xGroupDelConsumer, xGroupDelConsumer, xGroupDestroy, xInfo, xInfoConsumers, xInfoGroups, xLen, xPending, xPending, xPending, xPending, xPending, xPending, xPending, xRange, xRange, xRead, xRead, xReadGroup, xReadGroup, xRevRange, xRevRange, xTrim, xTrim
eval, evalSha, evalSha, scriptExists, scriptFlush, scriptKill, scriptLoad
geoAdd, geoAdd, geoAdd, geoAdd, geoDist, geoDist, geoHash, geoPos, geoRadius, geoRadius, geoRadiusByMember, geoRadiusByMember, geoRadiusByMember, geoRemove, geoSearch, geoSearchStore
pfAdd, pfCount, pfMerge
Object execute(String command, String... args)
command
- Command to executeargs
- Possible command arguments (may be null)RedisCommands#execute(String, byte[]...)
Object execute(String command)
command
- Command to executeRedisCommands#execute(String, byte[]...)
Boolean exists(String key)
key
exists.key
- must not be null.RedisKeyCommands.exists(byte[])
@Nullable Long exists(String... keys)
keys
exist.keys
- must not be null.RedisKeyCommands.exists(byte[][])
Long del(String... keys)
keys
.keys
- must not be null.RedisKeyCommands#del(byte[]...)
Boolean copy(String sourceKey, String targetKey, boolean replace)
sourceKey
to targetKey
.sourceKey
- must not be null.targetKey
- must not be null.replace
- whether to replace existing keys.RedisKeyCommands.copy(byte[], byte[], boolean)
@Nullable Long unlink(String... keys)
keys
from the keyspace. Unlike with del(String...)
the actual memory reclaiming here
happens asynchronously.keys
- must not be null.DataType type(String key)
key
.key
- must not be null.RedisKeyCommands.type(byte[])
@Nullable Long touch(String... keys)
key(s)
.keys
- must not be null.Collection<String> keys(String pattern)
pattern
.pattern
- must not be null.RedisKeyCommands.keys(byte[])
void rename(String oldKey, String newKey)
oldKey
to newKey
.oldKey
- must not be null.newKey
- must not be null.RedisKeyCommands.rename(byte[], byte[])
Boolean renameNX(String oldKey, String newKey)
oldKey
to newKey
only if newKey
does not exist.oldName
- must not be null.newKey
- must not be null.RedisKeyCommands.renameNX(byte[], byte[])
Boolean expire(String key, long seconds)
key
in seconds.key
- must not be null.seconds
- RedisKeyCommands.expire(byte[], long)
Boolean pExpire(String key, long millis)
key
in milliseconds.key
- must not be null.millis
- RedisKeyCommands.pExpire(byte[], long)
Boolean expireAt(String key, long unixTime)
key
as a UNIX timestamp.key
- must not be null.unixTime
- RedisKeyCommands.expireAt(byte[], long)
Boolean pExpireAt(String key, long unixTimeInMillis)
key
as a UNIX timestamp in milliseconds.key
- must not be null.unixTimeInMillis
- RedisKeyCommands.pExpireAt(byte[], long)
Boolean persist(String key)
key
.key
- must not be null.RedisKeyCommands.persist(byte[])
Boolean move(String key, int dbIndex)
key
to database with index
.key
- must not be null.dbIndex
- RedisKeyCommands.move(byte[], int)
Long ttl(String key)
key
in seconds.key
- must not be null.RedisKeyCommands.ttl(byte[])
Long ttl(String key, TimeUnit timeUnit)
key
in and convert it to the given TimeUnit
.key
- must not be null.timeUnit
- must not be null.RedisKeyCommands.ttl(byte[], TimeUnit)
Long pTtl(String key)
key
in milliseconds.key
- must not be null.RedisKeyCommands.pTtl(byte[])
Long pTtl(String key, TimeUnit timeUnit)
key
in and convert it to the given TimeUnit
.key
- must not be null.timeUnit
- must not be null.RedisKeyCommands.pTtl(byte[], TimeUnit)
String echo(String message)
message
via server roundtrip.message
- the message to echo.RedisConnectionCommands.echo(byte[])
List<String> sort(String key, SortParameters params)
key
.key
- must not be null.params
- must not be null.Long sort(String key, SortParameters params, String storeKey)
key
and store result in storeKey
.key
- must not be null.params
- must not be null.storeKey
- must not be null.@Nullable ValueEncoding encodingOf(String key)
key
.key
- must not be null.IllegalArgumentException
- if key
is null.@Nullable Duration idletime(String key)
Duration
since the object stored at the given key
is idle.key
- must not be null.IllegalArgumentException
- if key
is null.@Nullable Long refcount(String key)
key
.key
- must not be null.IllegalArgumentException
- if key
is null.String get(String key)
key
.key
- must not be null.RedisStringCommands.get(byte[])
@Nullable String getDel(String key)
key
and delete the key.key
- must not be null.@Nullable String getEx(String key, Expiration expiration)
key
and expire the key by applying Expiration
.key
- must not be null.expiration
- must not be null.String getSet(String key, String value)
value
of key
and return its old value.key
- must not be null.value
- RedisStringCommands.getSet(byte[], byte[])
List<String> mGet(String... keys)
keys
. Values are returned in the order of the requested keys.keys
- must not be null.RedisStringCommands#mGet(byte[]...)
@Nullable Boolean set(String key, String value)
value
for key
.key
- must not be null.value
- must not be null.RedisStringCommands.set(byte[], byte[])
@Nullable Boolean set(String key, String value, Expiration expiration, RedisStringCommands.SetOption option)
value
for key
applying timeouts from expiration
if set and inserting/updating values
depending on option
.key
- must not be null.value
- must not be null.expiration
- can be null. Defaulted to Expiration.persistent()
. Use
Expiration.keepTtl()
to keep the existing expiration.option
- can be null. Defaulted to SetOption#UPSERT
.RedisStringCommands.set(byte[], byte[], Expiration, SetOption)
@Nullable Boolean setNX(String key, String value)
value
for key
, only if key
does not exist.key
- must not be null.value
- must not be null.RedisStringCommands.setNX(byte[], byte[])
@Nullable Boolean setEx(String key, long seconds, String value)
value
and expiration in seconds
for key
.key
- must not be null.seconds
- value
- must not be null.RedisStringCommands.setEx(byte[], long, byte[])
@Nullable Boolean pSetEx(String key, long milliseconds, String value)
value
and expiration in milliseconds
for key
.key
- must not be null.milliseconds
- value
- must not be null.RedisStringCommands.pSetEx(byte[], long, byte[])
@Nullable Boolean mSetString(Map<String,String> tuple)
tuple
.tuple
- must not be null.RedisStringCommands.mSet(Map)
Boolean mSetNXString(Map<String,String> tuple)
tuple
only if the provided key does
not exist.tuple
- must not be null.RedisStringCommands.mSetNX(Map)
Long incr(String key)
key
by 1.key
- must not be null.RedisStringCommands.incr(byte[])
Long incrBy(String key, long value)
key
by delta
.key
- must not be null.value
- RedisStringCommands.incrBy(byte[], long)
Double incrBy(String key, double value)
key
by delta
.key
- must not be null.value
- RedisStringCommands.incrBy(byte[], double)
Long decr(String key)
key
by 1.key
- must not be null.RedisStringCommands.decr(byte[])
Long decrBy(String key, long value)
key
by value
.key
- must not be null.value
- RedisStringCommands.decrBy(byte[], long)
Long append(String key, String value)
value
to key
.key
- must not be null.value
- RedisStringCommands.append(byte[], byte[])
String getRange(String key, long start, long end)
key
between start
and end
.key
- must not be null.start
- end
- RedisStringCommands.getRange(byte[], long, long)
void setRange(String key, String value, long offset)
key
starting at the specified offset
with given value
.key
- must not be null.value
- offset
- RedisStringCommands.setRange(byte[], byte[], long)
Boolean getBit(String key, long offset)
offset
of value at key
.key
- must not be null.offset
- RedisStringCommands.getBit(byte[], long)
Boolean setBit(String key, long offset, boolean value)
offset
in value stored at key
.key
- must not be null.offset
- value
- offset
.RedisStringCommands.setBit(byte[], long, boolean)
Long bitCount(String key)
key
.key
- must not be null.RedisStringCommands.bitCount(byte[])
Long bitCount(String key, long start, long end)
key
between start
and
end
.key
- must not be null.start
- end
- RedisStringCommands.bitCount(byte[], long, long)
Long bitOp(RedisStringCommands.BitOperation op, String destination, String... keys)
op
- must not be null.destination
- must not be null.keys
- must not be null.RedisStringCommands#bitOp(BitOperation, byte[], byte[]...)
default Long bitPos(String key, boolean bit)
bit
in a string.key
- the key holding the actual String.bit
- the bit value to look for.@Nullable Long bitPos(String key, boolean bit, Range<Long> range)
bit
in a string.
Range
start and end can contain negative values in order to index
bytes starting from the end of the string, where -1 is the last byte, -2 is
the penultimate.key
- the key holding the actual String.bit
- the bit value to look for.range
- must not be null. Use Range#unbounded()
to not limit search.Long strLen(String key)
key
.key
- must not be null.RedisStringCommands.strLen(byte[])
Long rPush(String key, String... values)
values
to key
.key
- must not be null.values
- RedisListCommands#rPush(byte[], byte[]...)
@Nullable default Long lPos(String key, String element)
key
- must not be null.element
- must not be null.List<Long> lPos(String key, String element, @Nullable Integer rank, @Nullable Integer count)
key
- must not be null.element
- must not be null.rank
- specifies the "rank" of the first element to return, in case there are multiple matches. A rank of 1
means to return the first match, 2 to return the second match, and so forth.count
- number of matches to return.Long lPush(String key, String... values)
values
to key
.key
- must not be null.values
- RedisListCommands#lPush(byte[], byte[]...)
Long rPushX(String key, String value)
values
to key
only if the list exists.key
- must not be null.value
- RedisListCommands.rPushX(byte[], byte[])
Long lPushX(String key, String value)
values
to key
only if the list exists.key
- must not be null.value
- RedisListCommands.lPushX(byte[], byte[])
Long lLen(String key)
key
.key
- must not be null.RedisListCommands.lLen(byte[])
List<String> lRange(String key, long start, long end)
start
and end
from list at key
.key
- must not be null.start
- end
- RedisListCommands.lRange(byte[], long, long)
void lTrim(String key, long start, long end)
key
to elements between start
and end
.key
- must not be null.start
- end
- RedisListCommands.lTrim(byte[], long, long)
String lIndex(String key, long index)
index
form list at key
.key
- must not be null.index
- RedisListCommands.lIndex(byte[], long)
Long lInsert(String key, RedisListCommands.Position where, String pivot, String value)
value
Position#BEFORE
or Position#AFTER
existing pivot
for key
.key
- must not be null.where
- must not be null.pivot
- value
- RedisListCommands.lIndex(byte[], long)
@Nullable String lMove(String sourceKey, String destinationKey, RedisListCommands.Direction from, RedisListCommands.Direction to)
from
argument) of the
list stored at sourceKey
, and pushes the element at the first/last element (head/tail depending on the
to
argument) of the list stored at destinationKey
.sourceKey
- must not be null.destinationKey
- must not be null.from
- must not be null.to
- must not be null.RedisListCommands.bLMove(byte[], byte[], Direction, Direction, double)
,
RedisListCommands.lMove(byte[], byte[], Direction, Direction)
@Nullable String bLMove(String sourceKey, String destinationKey, RedisListCommands.Direction from, RedisListCommands.Direction to, double timeout)
from
argument) of the
list stored at sourceKey
, and pushes the element at the first/last element (head/tail depending on the
to
argument) of the list stored at destinationKey
.sourceKey
- must not be null.destinationKey
- must not be null.from
- must not be null.to
- must not be null.timeout
- RedisListCommands.lMove(byte[], byte[], Direction, Direction)
,
RedisListCommands.bLMove(byte[], byte[], Direction, Direction, double)
void lSet(String key, long index, String value)
value
list element at index
.key
- must not be null.index
- value
- RedisListCommands.lSet(byte[], long, byte[])
Long lRem(String key, long count, String value)
count
occurrences of value
from the list stored at key
.key
- must not be null.count
- value
- RedisListCommands.lRem(byte[], long, byte[])
String lPop(String key)
key
.key
- must not be null.RedisListCommands.lPop(byte[])
List<String> lPop(String key, long count)
key
.key
- must not be null.count
- RedisListCommands.lPop(byte[], long)
String rPop(String key)
key
.key
- must not be null.RedisListCommands.rPop(byte[])
List<String> rPop(String key, long count)
key
.key
- must not be null.count
- RedisListCommands.rPop(byte[], long)
List<String> bLPop(int timeout, String... keys)
keys
(see: RedisListCommands.lPop(byte[])
). timeout
reached.timeout
- keys
- must not be null.RedisListCommands#bLPop(int, byte[]...)
List<String> bRPop(int timeout, String... keys)
keys
(see: RedisListCommands.rPop(byte[])
). timeout
reached.timeout
- keys
- must not be null.RedisListCommands#bRPop(int, byte[]...)
String rPopLPush(String srcKey, String dstKey)
srcKey
, append it to dstKey
and return its value.srcKey
- must not be null.dstKey
- must not be null.RedisListCommands.rPopLPush(byte[], byte[])
String bRPopLPush(int timeout, String srcKey, String dstKey)
srcKey
, append it to dstKey
and return its value (see
RedisListCommands.rPopLPush(byte[], byte[])
). timeout
reached.timeout
- srcKey
- must not be null.dstKey
- must not be null.RedisListCommands.bRPopLPush(int, byte[], byte[])
Long sAdd(String key, String... values)
values
to set at key
.key
- must not be null.values
- RedisSetCommands#sAdd(byte[], byte[]...)
Long sRem(String key, String... values)
values
from set at key
and return the number of removed elements.key
- must not be null.values
- RedisSetCommands#sRem(byte[], byte[]...)
String sPop(String key)
key
.key
- must not be null.RedisSetCommands.sPop(byte[])
List<String> sPop(String key, long count)
count
random members from set at key
.key
- must not be null.count
- the number of random members to return.List
if key does not exist.RedisSetCommands.sPop(byte[], long)
Boolean sMove(String srcKey, String destKey, String value)
value
from srcKey
to destKey
srcKey
- must not be null.destKey
- must not be null.value
- RedisSetCommands.sMove(byte[], byte[], byte[])
Long sCard(String key)
key
.key
- must not be null.RedisSetCommands.sCard(byte[])
Boolean sIsMember(String key, String value)
key
contains value
.key
- must not be null.value
- RedisSetCommands.sIsMember(byte[], byte[])
@Nullable List<Boolean> sMIsMember(String key, String... values)
key
contains one or more values
.key
- must not be null.values
- must not be null.RedisSetCommands#sMIsMember(byte[], byte[]...)
Set<String> sInter(String... keys)
keys
.keys
- must not be null.RedisSetCommands#sInter(byte[]...)
Long sInterStore(String destKey, String... keys)
keys
and store result in destKey
.destKey
- must not be null.keys
- must not be null.RedisSetCommands#sInterStore(byte[], byte[]...)
Set<String> sUnion(String... keys)
keys
.keys
- must not be null.RedisSetCommands#sUnion(byte[]...)
Long sUnionStore(String destKey, String... keys)
keys
and store result in destKey
.destKey
- must not be null.keys
- must not be null.RedisSetCommands#sUnionStore(byte[], byte[]...)
Set<String> sDiff(String... keys)
keys
.keys
- must not be null.RedisSetCommands#sDiff(byte[]...)
Long sDiffStore(String destKey, String... keys)
keys
and store result in destKey
.destKey
- must not be null.keys
- must not be null.RedisSetCommands#sDiffStore(byte[], byte[]...)
Set<String> sMembers(String key)
key
.key
- must not be null.RedisSetCommands.sMembers(byte[])
String sRandMember(String key)
key
.key
- must not be null.RedisSetCommands.sRandMember(byte[])
List<String> sRandMember(String key, long count)
count
random elements from set at key
.key
- must not be null.count
- RedisSetCommands#sRem(byte[], byte[]...)
Cursor<String> sScan(String key, ScanOptions options)
Cursor
to iterate over elements in set at key
.key
- must not be null.options
- must not be null.RedisSetCommands.sScan(byte[], ScanOptions)
Boolean zAdd(String key, double score, String value)
value
to a sorted set at key
, or update its score
if it already exists.key
- must not be null.score
- the score.value
- the value.RedisZSetCommands.zAdd(byte[], double, byte[])
Boolean zAdd(String key, double score, String value, RedisZSetCommands.ZAddArgs args)
value
to a sorted set at key
, or update its score
depending on the given
args
.key
- must not be null.score
- must not be null.value
- must not be null.args
- must not be null use ZAddArgs#empty()
instead.RedisZSetCommands.zAdd(byte[], double, byte[], ZAddArgs)
Long zAdd(String key, Set<StringRedisConnection.StringTuple> tuples)
tuples
to a sorted set at key
, or update its score
if it already exists.key
- must not be null.tuples
- the tuples.RedisZSetCommands.zAdd(byte[], Set)
@Nullable Long zAdd(String key, Set<StringRedisConnection.StringTuple> tuples, RedisZSetCommands.ZAddArgs args)
tuples
to a sorted set at key
, or update its score
depending on the given
args
.key
- must not be null.tuples
- must not be null.args
- must not be null use ZAddArgs#empty()
instead.RedisZSetCommands.zAdd(byte[], Set, ZAddArgs)
Long zRem(String key, String... values)
values
from sorted set. Return number of removed elements.key
- must not be null.values
- must not be null.RedisZSetCommands#zRem(byte[], byte[]...)
Double zIncrBy(String key, double increment, String value)
value
in sorted set by increment
.key
- must not be null.increment
- value
- the value.RedisZSetCommands.zIncrBy(byte[], double, byte[])
@Nullable String zRandMember(String key)
key
.key
- must not be null.@Nullable List<String> zRandMember(String key, long count)
count
random elements from sorted set at key
.key
- must not be null.count
- if the provided count
argument is positive, return a list of distinct fields, capped either at
count
or the set size. If count
is negative, the behavior changes and the command is
allowed to return the same value multiple times. In this case, the number of returned values is the
absolute value of the specified count.@Nullable StringRedisConnection.StringTuple zRandMemberWithScore(String key)
key
.key
- must not be null.@Nullable List<StringRedisConnection.StringTuple> zRandMemberWithScores(String key, long count)
count
random elements from sorted set at key
.key
- must not be null.count
- if the provided count
argument is positive, return a list of distinct fields, capped either at
count
or the set size. If count
is negative, the behavior changes and the command is
allowed to return the same value multiple times. In this case, the number of returned values is the
absolute value of the specified count.Long zRank(String key, String value)
value
in a sorted set.key
- must not be null.value
- the value.RedisZSetCommands.zRank(byte[], byte[])
Long zRevRank(String key, String value)
value
in a sorted set when scored high to low.key
- must not be null.value
- the value.RedisZSetCommands.zRevRank(byte[], byte[])
Set<String> zRange(String key, long start, long end)
start
and end
from sorted set.key
- must not be null.start
- end
- RedisZSetCommands.zRange(byte[], long, long)
Set<StringRedisConnection.StringTuple> zRangeWithScores(String key, long start, long end)
Tuple
s between start
and end
from sorted set.key
- must not be null.start
- end
- RedisZSetCommands.zRangeWithScores(byte[], long, long)
Set<String> zRangeByScore(String key, double min, double max)
min
and max
from sorted set.key
- must not be null.min
- max
- RedisZSetCommands.zRangeByScore(byte[], double, double)
Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key, double min, double max)
Tuple
s where score is between min
and max
from sorted set.key
- must not be null.min
- max
- RedisZSetCommands.zRangeByScoreWithScores(byte[], double, double)
Set<String> zRangeByScore(String key, double min, double max, long offset, long count)
start
to end
where score is between min
and max
from
sorted set.key
- must not be null.min
- max
- offset
- count
- RedisZSetCommands.zRangeByScore(byte[], double, double, long, long)
Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key, double min, double max, long offset, long count)
Tuple
s in range from start
to end
where score is between min
and
max
from sorted set.key
- min
- max
- offset
- count
- RedisZSetCommands.zRangeByScoreWithScores(byte[], double, double, long, long)
Set<String> zRevRange(String key, long start, long end)
start
to end
from sorted set ordered from high to low.key
- must not be null.start
- end
- RedisZSetCommands.zRevRange(byte[], long, long)
Set<StringRedisConnection.StringTuple> zRevRangeWithScores(String key, long start, long end)
Tuple
s in range from start
to end
from sorted set ordered from high to low.key
- must not be null.start
- end
- RedisZSetCommands.zRevRangeWithScores(byte[], long, long)
Set<String> zRevRangeByScore(String key, double min, double max)
min
and max
from sorted set ordered from high to low.key
- must not be null.min
- max
- RedisZSetCommands.zRevRangeByScore(byte[], double, double)
Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key, double min, double max)
Tuple
where score is between min
and max
from sorted set ordered from high to
low.key
- must not be null.min
- max
- RedisZSetCommands.zRevRangeByScoreWithScores(byte[], double, double)
Set<String> zRevRangeByScore(String key, double min, double max, long offset, long count)
start
to end
where score is between min
and max
from
sorted set ordered high -> low.key
- must not be null.min
- max
- offset
- count
- RedisZSetCommands.zRevRangeByScore(byte[], double, double, long, long)
Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key, double min, double max, long offset, long count)
Tuple
in range from start
to end
where score is between min
and
max
from sorted set ordered high -> low.key
- must not be null.min
- max
- offset
- count
- RedisZSetCommands.zRevRangeByScoreWithScores(byte[], double, double, long, long)
Long zCount(String key, double min, double max)
min
and max
.key
- must not be null.min
- max
- RedisZSetCommands.zCount(byte[], double, double)
@Nullable Long zLexCount(String key, RedisZSetCommands.Range range)
Range#min
and Range#max
applying
lexicographical ordering.key
- must not be null.range
- must not be null.RedisZSetCommands.zLexCount(byte[], Range)
@Nullable RedisZSetCommands.Tuple zPopMin(String key)
key
.key
- must not be null.@Nullable Set<StringRedisConnection.StringTuple> zPopMin(String key, long count)
count
values with their score having the lowest score from sorted set at key
.key
- must not be null.count
- number of elements to pop.@Nullable StringRedisConnection.StringTuple bZPopMin(String key, long timeout, TimeUnit unit)
key
. Blocks
connection until element available or timeout
reached.key
- must not be null.timeout
- unit
- must not be null.@Nullable StringRedisConnection.StringTuple zPopMax(String key)
key
.key
- must not be null.@Nullable Set<StringRedisConnection.StringTuple> zPopMax(String key, long count)
count
values with their score having the highest score from sorted set at key
.key
- must not be null.count
- number of elements to pop.@Nullable StringRedisConnection.StringTuple bZPopMax(String key, long timeout, TimeUnit unit)
key
. Blocks
connection until element available or timeout
reached.key
- must not be null.timeout
- unit
- must not be null.Long zCard(String key)
key
.key
- must not be null.RedisZSetCommands.zCard(byte[])
Double zScore(String key, String value)
value
from sorted set with key key
.key
- must not be null.value
- the value.RedisZSetCommands.zScore(byte[], byte[])
List<Double> zMScore(String key, String... values)
values
from sorted set with key key
.key
- must not be null.values
- the values.RedisZSetCommands.zMScore(byte[], byte[][])
Long zRemRange(String key, long start, long end)
start
and end
from sorted set with key
.key
- must not be null.start
- end
- RedisZSetCommands.zRemRange(byte[], long, long)
Long zRemRangeByLex(String key, RedisZSetCommands.Range range)
Range
.key
- must not be null.range
- must not be null.Long zRemRangeByScore(String key, double min, double max)
min
and max
from sorted set with key
.key
- must not be null.min
- max
- RedisZSetCommands.zRemRangeByScore(byte[], double, double)
@Nullable Set<String> zDiff(String... sets)
sets
.sets
- must not be null.@Nullable Set<StringRedisConnection.StringTuple> zDiffWithScores(String... sets)
sets
.sets
- must not be null.@Nullable Long zDiffStore(String destKey, String... sets)
sets
and store result in destination destKey
.destKey
- must not be null.sets
- must not be null.@Nullable Set<String> zInter(String... sets)
sets
.sets
- must not be null.@Nullable Set<StringRedisConnection.StringTuple> zInterWithScores(String... sets)
sets
.sets
- must not be null.@Nullable default Set<StringRedisConnection.StringTuple> zInterWithScores(RedisZSetCommands.Aggregate aggregate, int[] weights, String... sets)
sets
.aggregate
- must not be null.weights
- must not be null.sets
- must not be null.@Nullable Set<StringRedisConnection.StringTuple> zInterWithScores(RedisZSetCommands.Aggregate aggregate, RedisZSetCommands.Weights weights, String... sets)
sets
.aggregate
- must not be null.weights
- must not be null.sets
- must not be null.Long zInterStore(String destKey, String... sets)
sets
and store result in destination key
.destKey
- must not be null.sets
- must not be null.RedisZSetCommands#zInterStore(byte[], byte[]...)
Long zInterStore(String destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, String... sets)
sets
and store result in destination key
.destKey
- must not be null.aggregate
- must not be null.weights
- sets
- must not be null.RedisZSetCommands#zInterStore(byte[], Aggregate, int[], byte[]...)
@Nullable Set<String> zUnion(String... sets)
sets
.sets
- must not be null.@Nullable Set<StringRedisConnection.StringTuple> zUnionWithScores(String... sets)
sets
.sets
- must not be null.@Nullable default Set<StringRedisConnection.StringTuple> zUnionWithScores(RedisZSetCommands.Aggregate aggregate, int[] weights, String... sets)
sets
.aggregate
- must not be null.weights
- must not be null.sets
- must not be null.@Nullable Set<StringRedisConnection.StringTuple> zUnionWithScores(RedisZSetCommands.Aggregate aggregate, RedisZSetCommands.Weights weights, String... sets)
sets
.aggregate
- must not be null.weights
- must not be null.sets
- must not be null.Long zUnionStore(String destKey, String... sets)
sets
and store result in destination key
.destKey
- must not be null.sets
- must not be null.RedisZSetCommands#zUnionStore(byte[], byte[]...)
Long zUnionStore(String destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, String... sets)
sets
and store result in destination key
.destKey
- must not be null.aggregate
- must not be null.weights
- sets
- must not be null.RedisZSetCommands#zUnionStore(byte[], Aggregate, int[], byte[]...)
Cursor<StringRedisConnection.StringTuple> zScan(String key, ScanOptions options)
Cursor
to iterate over elements in sorted set at key
.key
- must not be null.options
- must not be null.RedisZSetCommands.zScan(byte[], ScanOptions)
Set<String> zRangeByScore(String key, String min, String max)
min
and max
from sorted set.key
- must not be null.min
- must not be null.max
- must not be null.RedisZSetCommands.zRangeByScore(byte[], String, String)
Set<String> zRangeByScore(String key, String min, String max, long offset, long count)
start
to end
where score is between min
and max
from
sorted set.key
- must not be null.min
- must not be null.max
- must not be null.offset
- count
- RedisZSetCommands.zRangeByScore(byte[], double, double, long, long)
Set<String> zRangeByLex(String key)
key
- must not be null.RedisZSetCommands.zRangeByLex(byte[])
Set<String> zRangeByLex(String key, RedisZSetCommands.Range range)
Range
from the sorted set at key in lexicographical ordering.key
- must not be null.range
- must not be null.RedisZSetCommands.zRangeByLex(byte[], Range)
Set<String> zRangeByLex(String key, RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
Range
from the sorted set at key in lexicographical ordering. Result is
limited via Limit
.key
- must not be null.range
- must not be null.limit
- can be null.RedisZSetCommands.zRangeByLex(byte[], Range, Limit)
default Set<String> zRevRangeByLex(String key)
key
- must not be null.RedisZSetCommands.zRevRangeByLex(byte[])
default Set<String> zRevRangeByLex(String key, RedisZSetCommands.Range range)
Range
from the sorted set at key in reversed lexicographical ordering.key
- must not be null.range
- must not be null.RedisZSetCommands.zRevRangeByLex(byte[], Range)
Set<String> zRevRangeByLex(String key, RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
Range
from the sorted set at key in reversed lexicographical ordering.
Result is limited via Limit
.key
- must not be null.range
- must not be null.limit
- must not be null.RedisZSetCommands.zRevRangeByLex(byte[], Range, Limit)
Boolean hSet(String key, String field, String value)
value
of a hash field
.key
- must not be null.field
- must not be null.value
- RedisHashCommands.hSet(byte[], byte[], byte[])
Boolean hSetNX(String key, String field, String value)
value
of a hash field
only if field
does not exist.key
- must not be null.field
- must not be null.value
- RedisHashCommands.hSetNX(byte[], byte[], byte[])
String hGet(String key, String field)
field
from hash at key
.key
- must not be null.field
- must not be null.RedisHashCommands.hGet(byte[], byte[])
List<String> hMGet(String key, String... fields)
fields
from hash at key
.key
- must not be null.fields
- must not be null.RedisHashCommands#hMGet(byte[], byte[]...)
void hMSet(String key, Map<String,String> hashes)
hashes
key
- must not be null.hashes
- must not be null.RedisHashCommands#hMGet(byte[], byte[]...)
Long hIncrBy(String key, String field, long delta)
value
of a hash field
by the given delta
.key
- must not be null.field
- must not be null.delta
- RedisHashCommands.hIncrBy(byte[], byte[], long)
Double hIncrBy(String key, String field, double delta)
value
of a hash field
by the given delta
.key
- must not be null.field
- delta
- RedisHashCommands.hIncrBy(byte[], byte[], double)
@Nullable String hRandField(String key)
key
.key
- must not be null.@Nullable Map.Entry<String,String> hRandFieldWithValues(String key)
key
.key
- must not be null.@Nullable List<String> hRandField(String key, long count)
key
. If the provided count
argument is
positive, return a list of distinct fields, capped either at count
or the hash size. If count
is
negative, the behavior changes and the command is allowed to return the same field multiple times. In this case,
the number of returned fields is the absolute value of the specified count.key
- must not be null.count
- number of fields to return.@Nullable List<Map.Entry<String,String>> hRandFieldWithValues(String key, long count)
key
. If the provided count
argument is
positive, return a list of distinct fields, capped either at count
or the hash size. If count
is
negative, the behavior changes and the command is allowed to return the same field multiple times. In this case,
the number of returned fields is the absolute value of the specified count.key
- must not be null.count
- number of fields to return.Boolean hExists(String key, String field)
field
exists.key
- must not be null.field
- must not be null.RedisHashCommands.hExists(byte[], byte[])
Long hDel(String key, String... fields)
fields
.key
- must not be null.fields
- must not be null.RedisHashCommands#hDel(byte[], byte[]...)
Long hLen(String key)
key
.key
- must not be null.RedisHashCommands.hLen(byte[])
Set<String> hKeys(String key)
key
.key
- must not be null.RedisHashCommands.hKeys(byte[])
List<String> hVals(String key)
field
.key
- must not be null.RedisHashCommands.hVals(byte[])
Map<String,String> hGetAll(String key)
key
.key
- must not be null.RedisHashCommands.hGetAll(byte[])
Cursor<Map.Entry<String,String>> hScan(String key, ScanOptions options)
Cursor
to iterate over entries in hash at key
.key
- must not be null.options
- must not be null.RedisHashCommands.hScan(byte[], ScanOptions)
@Nullable Long hStrLen(String key, String field)
field
in the hash stored at key
. If the key or the
field do not exist, 0
is returned.key
- must not be null.field
- must not be null.Long pfAdd(String key, String... values)
key
- must not be null.values
- must not be null.RedisHyperLogLogCommands#pfAdd(byte[], byte[]...)
Long pfCount(String... keys)
keys
- must not be null.RedisHyperLogLogCommands#pfCount(byte[]...)
void pfMerge(String destinationKey, String... sourceKeys)
destinationKey
- must not be null.sourceKeys
- must not be null.RedisHyperLogLogCommands#pfMerge(byte[], byte[]...)
Long geoAdd(String key, Point point, String member)
Point
with given member name to key.key
- must not be null.point
- must not be null.member
- must not be null.RedisGeoCommands.geoAdd(byte[], Point, byte[])
Long geoAdd(String key, RedisGeoCommands.GeoLocation<String> location)
GeoLocation
to key.key
- must not be null.location
- must not be null.RedisGeoCommands.geoAdd(byte[], GeoLocation)
Long geoAdd(String key, Map<String,Point> memberCoordinateMap)
key
- must not be null.memberCoordinateMap
- must not be null.RedisGeoCommands.geoAdd(byte[], Map)
Long geoAdd(String key, Iterable<RedisGeoCommands.GeoLocation<String>> locations)
GeoLocation
s to keykey
- must not be null.locations
- must not be null.RedisGeoCommands.geoAdd(byte[], Iterable)
Distance geoDist(String key, String member1, String member2)
Distance
between member1 and member2.key
- must not be null.member1
- must not be null.member2
- must not be null.RedisGeoCommands.geoDist(byte[], byte[], byte[])
Distance geoDist(String key, String member1, String member2, Metric metric)
key
- must not be null.member1
- must not be null.member2
- must not be null.metric
- must not be null.RedisGeoCommands.geoDist(byte[], byte[], byte[], Metric)
List<String> geoHash(String key, String... members)
key
- must not be null.members
- must not be null.RedisGeoCommands#geoHash(byte[], byte[]...)
List<Point> geoPos(String key, String... members)
Point
representation of positions for one or more members.key
- must not be null.members
- must not be null.RedisGeoCommands#geoPos(byte[], byte[]...)
GeoResults<RedisGeoCommands.GeoLocation<String>> geoRadius(String key, Circle within)
Circle
.key
- must not be null.within
- must not be null.RedisGeoCommands.geoRadius(byte[], Circle)
GeoResults<RedisGeoCommands.GeoLocation<String>> geoRadius(String key, Circle within, RedisGeoCommands.GeoRadiusCommandArgs args)
Circle
applying GeoRadiusCommandArgs
.key
- must not be null.within
- must not be null.args
- must not be null.RedisGeoCommands.geoRadius(byte[], Circle, GeoRadiusCommandArgs)
GeoResults<RedisGeoCommands.GeoLocation<String>> geoRadiusByMember(String key, String member, double radius)
key
- must not be null.member
- must not be null.radius
- RedisGeoCommands.geoRadiusByMember(byte[], byte[], double)
GeoResults<RedisGeoCommands.GeoLocation<String>> geoRadiusByMember(String key, String member, Distance radius)
Distance
.key
- must not be null.member
- must not be null.radius
- must not be null.RedisGeoCommands.geoRadiusByMember(byte[], byte[], Distance)
GeoResults<RedisGeoCommands.GeoLocation<String>> geoRadiusByMember(String key, String member, Distance radius, RedisGeoCommands.GeoRadiusCommandArgs args)
Distance
and GeoRadiusCommandArgs
.key
- must not be null.member
- must not be null.radius
- must not be null.args
- must not be null.RedisGeoCommands.geoRadiusByMember(byte[], byte[], Distance, GeoRadiusCommandArgs)
Long geoRemove(String key, String... members)
key
- must not be null.members
- must not be null.RedisGeoCommands#geoRemove(byte[], byte[]...)
@Nullable GeoResults<RedisGeoCommands.GeoLocation<String>> geoSearch(String key, GeoReference<String> reference, GeoShape predicate, RedisGeoCommands.GeoSearchCommandArgs args)
shape
. The query's center point is provided by
GeoReference
.key
- must not be null.reference
- must not be null.predicate
- must not be null.args
- must not be null.@Nullable Long geoSearchStore(String destKey, String key, GeoReference<String> reference, GeoShape predicate, RedisGeoCommands.GeoSearchStoreCommandArgs args)
shape
and store the result at destKey
. The query's center point is provided by
GeoReference
.key
- must not be null.reference
- must not be null.predicate
- must not be null.args
- must not be null.Long publish(String channel, String message)
channel
- the channel to publish to, must not be null.message
- message to publishRedisPubSubCommands.publish(byte[], byte[])
void subscribe(MessageListener listener, String... channels)
Note that this operation is blocking and the current thread starts waiting for new messages immediately.
listener
- message listener, must not be null.channels
- channel names, must not be null.RedisPubSubCommands#subscribe(MessageListener, byte[]...)
void pSubscribe(MessageListener listener, String... patterns)
Note that this operation is blocking and the current thread starts waiting for new messages immediately.
listener
- message listener, must not be null.patterns
- channel name patterns, must not be null.RedisPubSubCommands#pSubscribe(MessageListener, byte[]...)
String scriptLoad(String script)
#evalSha(byte[], ReturnType, int, byte[]...)
.script
- must not be null.RedisScriptingCommands.scriptLoad(byte[])
<T> T eval(String script, ReturnType returnType, int numKeys, String... keysAndArgs)
script
.script
- must not be null.returnType
- must not be null.numKeys
- keysAndArgs
- must not be null.RedisScriptingCommands#eval(byte[], ReturnType, int, byte[]...)
<T> T evalSha(String scriptSha, ReturnType returnType, int numKeys, String... keysAndArgs)
scriptSha
.scriptSha
- must not be null.returnType
- must not be null.numKeys
- keysAndArgs
- must not be null.RedisScriptingCommands#evalSha(String, ReturnType, int, byte[]...)
void setClientName(String name)
name
- RedisServerCommands.setClientName(byte[])
List<RedisClientInfo> getClientList()
getClientList
in interface RedisServerCommands
List
of RedisClientInfo
objects.RedisServerCommands.getClientList()
List<Long> bitfield(String key, BitFieldSubCommands command)
key
.key
- must not be null.command
- must not be null.@Nullable default Long xAck(String key, String group, String... entryIds)
key
- the stream key.group
- name of the consumer group.entryIds
- record Id's to acknowledge.@Nullable default RecordId xAdd(String key, Map<String,String> body)
key
.key
- the stream key.body
- record body.@Nullable default RecordId xAdd(StringRecord record)
StringRecord
to the stream stored at Record.getStream()
.record
- must not be null.@Nullable RecordId xAdd(StringRecord record, RedisStreamCommands.XAddOptions options)
StringRecord
to the stream stored at Record.getStream()
.record
- must not be null.options
- must not be null, use XAddOptions#none()
instead.List<RecordId> xClaimJustId(String key, String group, String newOwner, RedisStreamCommands.XClaimOptions options)
key
- the key the stream is stored at.group
- the name of the consumer group.newOwner
- the name of the new consumer.options
- must not be null.ids
that changed user.default List<StringRecord> xClaim(String key, String group, String newOwner, Duration minIdleTime, RecordId... recordIds)
key
- the key the stream is stored at.group
- the name of the consumer group.newOwner
- the name of the new consumer.minIdleTime
- must not be null.recordIds
- must not be null.StringRecord
that changed user.List<StringRecord> xClaim(String key, String group, String newOwner, RedisStreamCommands.XClaimOptions options)
key
- the key the stream is stored at.group
- the name of the consumer group.newOwner
- the name of the new consumer.options
- must not be null.StringRecord
that changed user.@Nullable default Long xDel(String key, String... entryIds)
key
- the stream key.entryIds
- stream record Id's.@Nullable String xGroupCreate(String key, ReadOffset readOffset, String group)
key
- the stream key.readOffset
- group
- name of the consumer group.@Nullable String xGroupCreate(String key, ReadOffset readOffset, String group, boolean mkStream)
key
- the stream key.readOffset
- group
- name of the consumer group.mkStream
- if true the group will create the stream if needed (MKSTREAM)@Nullable Boolean xGroupDelConsumer(String key, Consumer consumer)
key
- the stream key.consumer
- consumer identified by group name and consumer key.@Nullable Boolean xGroupDestroy(String key, String group)
key
- the stream key.group
- name of the consumer group.@Nullable StreamInfo.XInfoStream xInfo(String key)
key
- the key the stream is stored at.@Nullable StreamInfo.XInfoGroups xInfoGroups(String key)
key
- the key the stream is stored at.@Nullable StreamInfo.XInfoConsumers xInfoConsumers(String key, String groupName)
key
- the key the stream is stored at.groupName
- name of the consumer group.@Nullable Long xLen(String key)
key
- the stream key.@Nullable PendingMessagesSummary xPending(String key, String groupName)
PendingMessagesSummary
for a given consumer group.key
- the key the stream is stored at. Must not be null.groupName
- the name of the consumer group. Must not be null.@Nullable PendingMessages xPending(String key, String groupName, String consumerName, Range<String> range, Long count)
key
- the key the stream is stored at. Must not be null.groupName
- the name of the consumer group. Must not be null.consumerName
- the name of the consumer. Must not be null.range
- the range of messages ids to search within. Must not be null.count
- limit the number of results. Must not be null.@Nullable PendingMessages xPending(String key, String groupName, Range<String> range, Long count)
key
- the key the stream is stored at. Must not be null.groupName
- the name of the consumer group. Must not be null.range
- the range of messages ids to search within. Must not be null.count
- limit the number of results. Must not be null.@Nullable PendingMessages xPending(String key, String groupName, RedisStreamCommands.XPendingOptions options)
messages
applying given options
.key
- the key the stream is stored at. Must not be null.groupName
- the name of the consumer group. Must not be null.options
- the options containing range, consumer and count. Must not be
null.@Nullable default List<StringRecord> xRange(String key, Range<String> range)
Range
.key
- the stream key.range
- must not be null.@Nullable List<StringRecord> xRange(String key, Range<String> range, RedisZSetCommands.Limit limit)
Range
applying a Limit
.key
- the stream key.range
- must not be null.limit
- must not be null.@Nullable default List<StringRecord> xReadAsString(StreamOffset<String> stream)
StreamOffset
s.stream
- the streams to read from.@Nullable default List<StringRecord> xReadAsString(StreamOffset<String>... streams)
StreamOffset
s.streams
- the streams to read from.@Nullable default List<StringRecord> xReadAsString(StreamReadOptions readOptions, StreamOffset<String> stream)
StreamOffset
s.readOptions
- read arguments.stream
- the streams to read from.@Nullable List<StringRecord> xReadAsString(StreamReadOptions readOptions, StreamOffset<String>... streams)
StreamOffset
s.readOptions
- read arguments.streams
- the streams to read from.@Nullable default List<StringRecord> xReadGroupAsString(Consumer consumer, StreamOffset<String> stream)
StreamOffset
s using a consumer group.consumer
- consumer/group.stream
- the streams to read from.@Nullable default List<StringRecord> xReadGroupAsString(Consumer consumer, StreamOffset<String>... streams)
StreamOffset
s using a consumer group.consumer
- consumer/group.streams
- the streams to read from.@Nullable default List<StringRecord> xReadGroupAsString(Consumer consumer, StreamReadOptions readOptions, StreamOffset<String> stream)
StreamOffset
s using a consumer group.consumer
- consumer/group.readOptions
- read arguments.stream
- the streams to read from.@Nullable List<StringRecord> xReadGroupAsString(Consumer consumer, StreamReadOptions readOptions, StreamOffset<String>... streams)
StreamOffset
s using a consumer group.consumer
- consumer/group.readOptions
- read arguments.streams
- the streams to read from.@Nullable default List<StringRecord> xRevRange(String key, Range<String> range)
Range
in reverse order.key
- the stream key.range
- must not be null.@Nullable List<StringRecord> xRevRange(String key, Range<String> range, RedisZSetCommands.Limit limit)
Range
applying a Limit
in reverse order.key
- the stream key.range
- must not be null.limit
- must not be null.@Nullable Long xTrim(String key, long count)
count
elements.key
- the stream key.count
- length of the stream.@Nullable Long xTrim(String key, long count, boolean approximateTrimming)
count
elements.key
- the stream key.count
- length of the stream.approximateTrimming
- the trimming must be performed in a approximated way in order to maximize performances.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.