public class DefaultStringRedisConnection extends Object implements StringRedisConnection, DecoratedRedisConnection
StringRedisConnection.StringRedisConnection.StringTupleRedisStringCommands.BitOperation, RedisStringCommands.SetOptionRedisListCommands.Direction, RedisListCommands.PositionRedisZSetCommands.Aggregate, RedisZSetCommands.Limit, RedisZSetCommands.Range, RedisZSetCommands.Tuple, RedisZSetCommands.Weights, RedisZSetCommands.ZAddArgsRedisServerCommands.MigrateOption, RedisServerCommands.ShutdownOptionRedisStreamCommands.XAddOptions, RedisStreamCommands.XClaimOptions, RedisStreamCommands.XPendingOptionsRedisGeoCommands.DistanceUnit, RedisGeoCommands.GeoCommandArgs, RedisGeoCommands.GeoLocation<T>, RedisGeoCommands.GeoRadiusCommandArgs, RedisGeoCommands.GeoSearchCommandArgs, RedisGeoCommands.GeoSearchStoreCommandArgs| Constructor and Description |
|---|
DefaultStringRedisConnection(RedisConnection connection)
Constructs a new
DefaultStringRedisConnection instance. |
DefaultStringRedisConnection(RedisConnection connection,
RedisSerializer<String> serializer)
Constructs a new
DefaultStringRedisConnection instance. |
| Modifier and Type | Method and Description |
|---|---|
Long |
append(byte[] key,
byte[] value)
Append a
value to key. |
Long |
append(String key,
String value)
Append a
value to key. |
void |
bgReWriteAof()
Start an Append Only File rewrite process on server.
|
void |
bgSave()
Start background saving of db on server.
|
void |
bgWriteAof()
Deprecated.
As of 1.3, use
bgReWriteAof(). |
Long |
bitCount(byte[] key)
Count the number of set bits (population counting) in value stored at
key. |
Long |
bitCount(byte[] key,
long start,
long end)
Count the number of set bits (population counting) of value stored at
key between start and
end. |
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(byte[] key,
BitFieldSubCommands subCommands)
Get / Manipulate specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset stored
at a given
key. |
List<Long> |
bitfield(String key,
BitFieldSubCommands operation)
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,
byte[] destination,
byte[]... keys)
Perform bitwise operations between strings.
|
Long |
bitOp(RedisStringCommands.BitOperation op,
String destination,
String... keys)
Perform bitwise operations between strings.
|
Long |
bitPos(byte[] key,
boolean bit,
Range<Long> range)
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. |
byte[] |
bLMove(byte[] sourceKey,
byte[] 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. |
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<byte[]> |
bLPop(int timeout,
byte[]... keys)
Removes and returns first element from lists stored at
keys. |
List<String> |
bLPop(int timeout,
String... keys)
Removes and returns first element from lists stored at
keys (see: RedisListCommands.lPop(byte[])). |
List<byte[]> |
bRPop(int timeout,
byte[]... keys)
Removes and returns last element from lists stored at
keys. |
List<String> |
bRPop(int timeout,
String... keys)
Removes and returns last element from lists stored at
keys (see: RedisListCommands.rPop(byte[])). |
byte[] |
bRPopLPush(int timeout,
byte[] srcKey,
byte[] dstKey)
Remove the last element from list at
srcKey, append it to dstKey and return its value. |
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[])). |
RedisZSetCommands.Tuple |
bZPopMax(byte[] key,
long timeout,
TimeUnit unit)
Remove and return the value with its score having the highest score from sorted set at
key. |
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. |
RedisZSetCommands.Tuple |
bZPopMin(byte[] key,
long timeout,
TimeUnit unit)
Remove and return the value with its score having the lowest 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. |
void |
close()
Closes (or quits) the connection.
|
List<Object> |
closePipeline()
Executes the commands in the pipeline and returns their result.
|
Boolean |
copy(byte[] sourceKey,
byte[] targetKey,
boolean replace)
Copy given
sourceKey to targetKey. |
Boolean |
copy(String sourceKey,
String targetKey,
boolean replace)
Copy given
sourceKey to targetKey. |
Long |
dbSize()
Get the total number of available keys in currently selected database.
|
Long |
decr(byte[] key)
Decrement an integer value stored as string value of
key by 1. |
Long |
decr(String key)
Decrement an integer value stored as string value of
key by 1. |
Long |
decrBy(byte[] key,
long value)
Decrement an integer value stored as string value of
key by value. |
Long |
decrBy(String key,
long value)
Decrement an integer value stored as string value of
key by value. |
Long |
del(byte[]... keys)
Delete given
keys. |
Long |
del(String... keys)
Delete given
keys. |
void |
discard()
Discard all commands issued after
RedisTxCommands.multi(). |
byte[] |
dump(byte[] key)
Retrieve serialized version of the value stored at
key. |
byte[] |
echo(byte[] message)
Returns
message via server roundtrip. |
String |
echo(String message)
Returns
message via server roundtrip. |
ValueEncoding |
encodingOf(byte[] key)
Get the type of internal representation used for storing the value at the given
key. |
ValueEncoding |
encodingOf(String key)
Get the type of internal representation used for storing the value at the given
key. |
<T> T |
eval(byte[] script,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
Evaluate given
script. |
<T> T |
eval(String script,
ReturnType returnType,
int numKeys,
String... keysAndArgs)
NOTE: This method will not deserialize Strings returned by Lua scripts, as they may not be encoded with the same
serializer used here.
|
<T> T |
evalSha(byte[] scriptSha1,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
Evaluate given
scriptSha. |
<T> T |
evalSha(String scriptSha1,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
Evaluate given
scriptSha. |
<T> T |
evalSha(String scriptSha1,
ReturnType returnType,
int numKeys,
String... keysAndArgs)
NOTE: This method will not deserialize Strings returned by Lua scripts, as they may not be encoded with the same
serializer used here.
|
List<Object> |
exec()
Executes all queued commands in a transaction started with
RedisTxCommands.multi(). |
Object |
execute(String command)
'Native' or 'raw' execution of the given command along-side the given arguments.
|
Object |
execute(String command,
byte[]... args)
'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(byte[]... keys)
Count how many of the given
keys exist. |
Boolean |
exists(byte[] key)
Determine if given
key exists. |
Long |
exists(String... keys)
Count how many of the given
keys exist. |
Boolean |
exists(String key)
Determine if given
key exists. |
Boolean |
expire(byte[] key,
long seconds)
Set time to live for given
key in seconds. |
Boolean |
expire(String key,
long seconds)
Set time to live for given
key in seconds. |
Boolean |
expireAt(byte[] key,
long unixTime)
Set the expiration for given
key as a UNIX timestamp. |
Boolean |
expireAt(String key,
long unixTime)
Set the expiration for given
key as a UNIX timestamp. |
void |
flushAll()
Delete all all keys from all databases.
|
void |
flushDb()
Delete all keys of the currently selected database.
|
Long |
geoAdd(byte[] key,
Iterable<RedisGeoCommands.GeoLocation<byte[]>> locations)
Add
RedisGeoCommands.GeoLocations to key |
Long |
geoAdd(byte[] key,
Map<byte[],Point> memberCoordinateMap)
|
Long |
geoAdd(byte[] key,
Point point,
byte[] member)
Add
Point with given member name to key. |
Long |
geoAdd(byte[] key,
RedisGeoCommands.GeoLocation<byte[]> location)
Add
RedisGeoCommands.GeoLocation to key. |
Long |
geoAdd(String key,
Iterable<RedisGeoCommands.GeoLocation<String>> locations)
Add
GeoLocations 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(byte[] key,
byte[] member1,
byte[] member2)
Get the
Distance between member1 and member2. |
Distance |
geoDist(byte[] key,
byte[] member1,
byte[] member2,
Metric metric)
|
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(byte[] key,
byte[]... members)
Get Geohash representation of the position for one or more members.
|
List<String> |
geoHash(String key,
String... members)
Get geohash representation of the position for one or more members.
|
List<Point> |
geoPos(byte[] key,
byte[]... members)
Get the
Point representation of positions 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<byte[]>> |
geoRadius(byte[] key,
Circle within)
Get the members within the boundaries of a given
Circle. |
GeoResults<RedisGeoCommands.GeoLocation<byte[]>> |
geoRadius(byte[] key,
Circle within,
RedisGeoCommands.GeoRadiusCommandArgs args)
Get the members within the boundaries of a given
Circle applying RedisGeoCommands.GeoRadiusCommandArgs. |
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<byte[]>> |
geoRadiusByMember(byte[] key,
byte[] member,
Distance radius)
Get the members within the circle defined by the members coordinates and given
Distance. |
GeoResults<RedisGeoCommands.GeoLocation<byte[]>> |
geoRadiusByMember(byte[] key,
byte[] member,
Distance radius,
RedisGeoCommands.GeoRadiusCommandArgs args)
Get the members within the circle defined by the members coordinates, given
Distance
and RedisGeoCommands.GeoRadiusCommandArgs. |
GeoResults<RedisGeoCommands.GeoLocation<byte[]>> |
geoRadiusByMember(byte[] key,
byte[] member,
double radius)
Get the members within the circle defined by the members coordinates and given
radius.
|
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(byte[] key,
byte[]... members)
Remove the members.
|
Long |
geoRemove(String key,
String... members)
Remove the members.
|
GeoResults<RedisGeoCommands.GeoLocation<byte[]>> |
geoSearch(byte[] key,
GeoReference<byte[]> 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. |
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(byte[] destKey,
byte[] key,
GeoReference<byte[]> 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. |
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. |
byte[] |
get(byte[] key)
Get the value of
key. |
String |
get(String key)
Get the value of
key. |
Boolean |
getBit(byte[] key,
long offset)
Get the bit value at
offset of value at 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 |
getClientName()
Returns the name of the current connection.
|
Properties |
getConfig(String pattern)
Load configuration parameters for given
pattern from server. |
byte[] |
getDel(byte[] key)
Return the value at
key and delete the key. |
String |
getDel(String key)
Return the value at
key and delete the key. |
RedisConnection |
getDelegate()
Gets the underlying
RedisConnection. |
byte[] |
getEx(byte[] key,
Expiration expiration)
Return the value at
key and expire the key by applying Expiration. |
String |
getEx(String key,
Expiration expiration)
Return the value at
key and expire the key by applying Expiration. |
Object |
getNativeConnection()
Returns the native connection (the underlying library/driver object).
|
byte[] |
getRange(byte[] key,
long start,
long end)
Get a substring of value of
key between start and end. |
String |
getRange(String key,
long start,
long end)
Get a substring of value of
key between start and end. |
RedisSentinelConnection |
getSentinelConnection() |
byte[] |
getSet(byte[] key,
byte[] value)
Set
value of key and return its old value. |
String |
getSet(String key,
String value)
Set
value of key and return its old value. |
Subscription |
getSubscription()
Returns the current subscription for this connection or null if the connection is not subscribed.
|
Long |
hDel(byte[] key,
byte[]... fields)
Delete given hash
fields. |
Long |
hDel(String key,
String... fields)
Delete given hash
fields. |
Boolean |
hExists(byte[] key,
byte[] field)
Determine if given hash
field exists. |
Boolean |
hExists(String key,
String field)
Determine if given hash
field exists. |
byte[] |
hGet(byte[] key,
byte[] field)
Get value for given
field from hash at key. |
String |
hGet(String key,
String field)
Get value for given
field from hash at key. |
Map<byte[],byte[]> |
hGetAll(byte[] key)
Get entire hash stored at
key. |
Map<String,String> |
hGetAll(String key)
Get entire hash stored at
key. |
Double |
hIncrBy(byte[] key,
byte[] field,
double delta)
Increment
value of a hash field by the given delta. |
Long |
hIncrBy(byte[] key,
byte[] field,
long delta)
Increment
value of a hash field by the given delta. |
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<byte[]> |
hKeys(byte[] key)
Get key set (fields) of hash at
key. |
Set<String> |
hKeys(String key)
Get key set (fields) of hash at
key. |
Long |
hLen(byte[] key)
Get size of hash at
key. |
Long |
hLen(String key)
Get size of hash at
key. |
List<byte[]> |
hMGet(byte[] key,
byte[]... fields)
Get values for given
fields from hash at key. |
List<String> |
hMGet(String key,
String... fields)
Get values for given
fields from hash at key. |
void |
hMSet(byte[] key,
Map<byte[],byte[]> hashes)
Set multiple hash fields to multiple values using data provided in
hashes |
void |
hMSet(String key,
Map<String,String> hashes)
Set multiple hash fields to multiple values using data provided in
hashes |
byte[] |
hRandField(byte[] key)
Return a random field from the hash stored at
key. |
List<byte[]> |
hRandField(byte[] key,
long count)
Return a random field from the hash stored at
key. |
String |
hRandField(String key)
Return a random field from the hash stored at
key. |
List<String> |
hRandField(String key,
long count)
Return a random field from the hash stored at
key. |
Map.Entry<byte[],byte[]> |
hRandFieldWithValues(byte[] key)
Return a random field from the hash along with its value stored at
key. |
List<Map.Entry<byte[],byte[]>> |
hRandFieldWithValues(byte[] key,
long count)
Return a random field from the hash along with its value stored at
key. |
Map.Entry<String,String> |
hRandFieldWithValues(String key)
Return a random field from the hash along with its value stored at
key. |
List<Map.Entry<String,String>> |
hRandFieldWithValues(String key,
long count)
Return a random field from the hash along with its value stored at
key. |
Cursor<Map.Entry<byte[],byte[]>> |
hScan(byte[] key,
ScanOptions options)
Use a
Cursor to iterate over entries in hash 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(byte[] key,
byte[] field,
byte[] value)
Set the
value of a hash field. |
Boolean |
hSet(String key,
String field,
String value)
Set the
value of a hash field. |
Boolean |
hSetNX(byte[] key,
byte[] field,
byte[] value)
Set the
value of a hash field only if field does not exist. |
Boolean |
hSetNX(String key,
String field,
String value)
Set the
value of a hash field only if field does not exist. |
Long |
hStrLen(byte[] key,
byte[] field)
Returns the length of the value associated with
field in the hash stored at key. |
Long |
hStrLen(String key,
String field)
Returns the length of the value associated with
field in the hash stored at key. |
List<byte[]> |
hVals(byte[] key)
Get entry set (values) of hash at
field. |
List<String> |
hVals(String key)
Get entry set (values) of hash at
field. |
Duration |
idletime(byte[] key)
Get the
Duration since the object stored at the given key is idle. |
Duration |
idletime(String key)
Get the
Duration since the object stored at the given key is idle. |
Long |
incr(byte[] key)
Increment an integer value stored as string value of
key by 1. |
Long |
incr(String key)
Increment an integer value stored as string value of
key by 1. |
Double |
incrBy(byte[] key,
double value)
Increment a floating point number value of
key by delta. |
Long |
incrBy(byte[] key,
long value)
Increment an integer value stored of
key by delta. |
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. |
Properties |
info()
Load default server information like
memory
cpu utilization
replication
|
Properties |
info(String section)
Load server information for given
selection. |
boolean |
isClosed()
Indicates whether the underlying connection is closed or not.
|
boolean |
isPipelined()
Indicates whether the connection is currently pipelined or not.
|
boolean |
isQueueing()
Indicates whether the connection is in "queue"(or "MULTI") mode or not.
|
boolean |
isSubscribed()
Indicates whether the current connection is subscribed (to at least one channel) or not.
|
Set<byte[]> |
keys(byte[] pattern)
Find all keys matching the given
pattern. |
Collection<String> |
keys(String pattern)
Find all keys matching the given
pattern. |
void |
killClient(String host,
int port)
Closes a given client connection identified by host:port.
|
Long |
lastSave()
Get time of last
RedisServerCommands.bgSave() operation in seconds. |
byte[] |
lIndex(byte[] key,
long index)
Get element at
index form list at key. |
String |
lIndex(String key,
long index)
Get element at
index form list at key. |
Long |
lInsert(byte[] key,
RedisListCommands.Position where,
byte[] pivot,
byte[] value)
Insert
value RedisListCommands.Position.BEFORE or RedisListCommands.Position.AFTER existing pivot for 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(byte[] key)
Get the size of list stored at
key. |
Long |
lLen(String key)
Get the size of list stored at
key. |
byte[] |
lMove(byte[] sourceKey,
byte[] 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 |
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. |
byte[] |
lPop(byte[] key)
Removes and returns first element in list stored at
key. |
List<byte[]> |
lPop(byte[] key,
long count)
Removes and returns first elements in list stored at
key. |
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. |
List<Long> |
lPos(byte[] key,
byte[] element,
Integer rank,
Integer count)
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(byte[] key,
byte[]... values)
Prepend
values to key. |
Long |
lPush(String key,
String... values)
Prepend
values to key. |
Long |
lPushX(byte[] key,
byte[] value)
Prepend
values to key only if the list exists. |
Long |
lPushX(String key,
String value)
Prepend
values to key only if the list exists. |
List<byte[]> |
lRange(byte[] key,
long start,
long end)
Get elements between
start and end from list at key. |
List<String> |
lRange(String key,
long start,
long end)
Get elements between
start and end from list at key. |
Long |
lRem(byte[] key,
long count,
byte[] value)
Removes the first
count occurrences of value from the list stored 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(byte[] key,
long index,
byte[] value)
Set the
value list element at index. |
void |
lSet(String key,
long index,
String value)
Set the
value list element at index. |
void |
lTrim(byte[] key,
long start,
long end)
Trim list at
key to elements between start and end. |
void |
lTrim(String key,
long start,
long end)
Trim list at
key to elements between start and end. |
List<byte[]> |
mGet(byte[]... keys)
Get multiple
keys. |
List<String> |
mGet(String... keys)
Get multiple
keys. |
void |
migrate(byte[] key,
RedisNode target,
int dbIndex,
RedisServerCommands.MigrateOption option)
Atomically transfer a key from a source Redis instance to a destination Redis instance.
|
void |
migrate(byte[] key,
RedisNode target,
int dbIndex,
RedisServerCommands.MigrateOption option,
long timeout)
Atomically transfer a key from a source Redis instance to a destination Redis instance.
|
Boolean |
move(byte[] key,
int dbIndex)
Move given
key to database with index. |
Boolean |
move(String key,
int dbIndex)
Move given
key to database with index. |
Boolean |
mSet(Map<byte[],byte[]> tuple)
Set multiple keys to multiple values using key-value pairs provided in
tuple. |
Boolean |
mSetNX(Map<byte[],byte[]> tuple)
Set multiple keys to multiple values using key-value pairs provided in
tuple only if the provided key does
not exist. |
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. |
void |
multi()
Mark the start of a transaction block.
|
void |
openPipeline()
Activates the pipeline mode for this connection.
|
Boolean |
persist(byte[] key)
Remove the expiration from given
key. |
Boolean |
persist(String key)
Remove the expiration from given
key. |
Boolean |
pExpire(byte[] key,
long millis)
Set time to live for given
key in milliseconds. |
Boolean |
pExpire(String key,
long millis)
Set time to live for given
key in milliseconds. |
Boolean |
pExpireAt(byte[] key,
long unixTimeInMillis)
Set the expiration for given
key as a UNIX timestamp in milliseconds. |
Boolean |
pExpireAt(String key,
long unixTimeInMillis)
Set the expiration for given
key as a UNIX timestamp in milliseconds. |
Long |
pfAdd(byte[] key,
byte[]... values)
Adds given values to the HyperLogLog stored at given key.
|
Long |
pfAdd(String key,
String... values)
Adds given values to the HyperLogLog stored at given key.
|
Long |
pfCount(byte[]... keys)
Return the approximated cardinality of the structures observed by the HyperLogLog at key(s).
|
Long |
pfCount(String... keys)
Return the approximated cardinality of the structures observed by the HyperLogLog at key(s).
|
void |
pfMerge(byte[] destinationKey,
byte[]... sourceKeys)
Merge N different HyperLogLogs at sourceKeys into a single destinationKey.
|
void |
pfMerge(String destinationKey,
String... sourceKeys)
Merge N different HyperLogLogs at sourceKeys into a single destinationKey.
|
String |
ping()
Test connection.
|
Boolean |
pSetEx(byte[] key,
long milliseconds,
byte[] value)
Set the
value and expiration in milliseconds for key. |
Boolean |
pSetEx(String key,
long seconds,
String value)
Set the
value and expiration in milliseconds for key. |
void |
pSubscribe(MessageListener listener,
byte[]... patterns)
Subscribes the connection to all channels matching the given patterns.
|
void |
pSubscribe(MessageListener listener,
String... patterns)
Subscribes the connection to all channels matching the given patterns.
|
Long |
pTtl(byte[] key)
Get the precise time to live for
key in milliseconds. |
Long |
pTtl(byte[] key,
TimeUnit timeUnit)
Get the precise time to live for
key in and convert it to the given TimeUnit. |
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(byte[] channel,
byte[] message)
Publishes the given message to the given channel.
|
Long |
publish(String channel,
String message)
Publishes the given message to the given channel.
|
byte[] |
randomKey()
Return a random key from the keyspace.
|
Long |
refcount(byte[] key)
Get the number of references of the value associated with the specified
key. |
Long |
refcount(String key)
Get the number of references of the value associated with the specified
key. |
void |
rename(byte[] oldKey,
byte[] newKey)
Rename key
oldKey to newKey. |
void |
rename(String oldKey,
String newKey)
Rename key
oldKey to newKey. |
Boolean |
renameNX(byte[] oldKey,
byte[] newKey)
Rename key
oldKey to newKey only if newKey does not exist. |
Boolean |
renameNX(String oldKey,
String newKey)
Rename key
oldKey to newKey only if newKey does not exist. |
void |
resetConfigStats()
Reset statistic counters on server.
|
void |
restore(byte[] key,
long ttlInMillis,
byte[] serializedValue,
boolean replace)
|
void |
rewriteConfig()
Rewrites the
redis.conf file. |
byte[] |
rPop(byte[] key)
Removes and returns last element in list stored at
key. |
List<byte[]> |
rPop(byte[] key,
long count)
Removes and returns last elements in list stored at
key. |
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. |
byte[] |
rPopLPush(byte[] srcKey,
byte[] dstKey)
Remove the last element from list at
srcKey, append it to dstKey and return its value. |
String |
rPopLPush(String srcKey,
String dstKey)
Remove the last element from list at
srcKey, append it to dstKey and return its value. |
Long |
rPush(byte[] key,
byte[]... values)
Append
values to key. |
Long |
rPush(String key,
String... values)
Append
values to key. |
Long |
rPushX(byte[] key,
byte[] value)
Append
values to key only if the list exists. |
Long |
rPushX(String key,
String value)
Append
values to key only if the list exists. |
Long |
sAdd(byte[] key,
byte[]... values)
Add given
values to set at key. |
Long |
sAdd(String key,
String... values)
Add given
values to set at key. |
void |
save()
Synchronous save current db snapshot on server.
|
Cursor<byte[]> |
scan(ScanOptions options)
Use a
Cursor to iterate over keys. |
Long |
sCard(byte[] key)
Get size of set at
key. |
Long |
sCard(String key)
Get size of set at
key. |
List<Boolean> |
scriptExists(String... scriptSha1)
Check if given
scriptShas exist in script cache. |
void |
scriptFlush()
Flush lua script cache.
|
void |
scriptKill()
Kill current lua script execution.
|
String |
scriptLoad(byte[] script)
Load lua script into scripts cache, without executing it.
|
String |
scriptLoad(String script)
Load lua script into scripts cache, without executing it.
|
Set<byte[]> |
sDiff(byte[]... keys)
Diff all sets for given
keys. |
Set<String> |
sDiff(String... keys)
Diff all sets for given
keys. |
Long |
sDiffStore(byte[] destKey,
byte[]... keys)
Diff all sets for given
keys and store result in destKey. |
Long |
sDiffStore(String destKey,
String... keys)
Diff all sets for given
keys and store result in destKey. |
void |
select(int dbIndex)
Select the DB with given positive
dbIndex. |
Boolean |
set(byte[] key,
byte[] value)
Set
value for key. |
Boolean |
set(byte[] key,
byte[] value,
Expiration expiration,
RedisStringCommands.SetOption option)
Set
value for key applying timeouts from expiration if set and inserting/updating values
depending on option. |
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(byte[] key,
long offset,
boolean value)
Sets the bit at
offset in value stored at key. |
Boolean |
setBit(String key,
long offset,
boolean value)
Sets the bit at
offset in value stored at key. |
void |
setClientName(byte[] name)
Assign given name to current connection.
|
void |
setClientName(String name)
Assign given name to current connection.
|
void |
setConfig(String param,
String value)
Set server configuration for
param to value. |
void |
setDeserializePipelineAndTxResults(boolean deserializePipelineAndTxResults)
Specifies if pipelined and tx results should be deserialized to Strings.
|
Boolean |
setEx(byte[] key,
long seconds,
byte[] value)
Set the
value and expiration in seconds for key. |
Boolean |
setEx(String key,
long seconds,
String value)
Set the
value and expiration in seconds for key. |
Boolean |
setNX(byte[] key,
byte[] value)
Set
value for key, only if key does not exist. |
Boolean |
setNX(String key,
String value)
Set
value for key, only if key does not exist. |
void |
setRange(byte[] key,
byte[] value,
long start)
Overwrite parts of
key starting at the specified offset with given value. |
void |
setRange(String key,
String value,
long start)
Overwrite parts of
key starting at the specified offset with given value. |
void |
shutdown()
Shutdown server.
|
void |
shutdown(RedisServerCommands.ShutdownOption option)
Shutdown server.
|
Set<byte[]> |
sInter(byte[]... keys)
Returns the members intersecting all given sets at
keys. |
Set<String> |
sInter(String... keys)
Returns the members intersecting all given sets at
keys. |
Long |
sInterStore(byte[] destKey,
byte[]... keys)
Intersect all given sets at
keys and store result in destKey. |
Long |
sInterStore(String destKey,
String... keys)
Intersect all given sets at
keys and store result in destKey. |
Boolean |
sIsMember(byte[] key,
byte[] value)
Check if set at
key contains value. |
Boolean |
sIsMember(String key,
String value)
Check if set at
key contains value. |
void |
slaveOf(String host,
int port)
Change redis replication setting to new master.
|
void |
slaveOfNoOne()
Change server into master.
|
Set<byte[]> |
sMembers(byte[] key)
Get all elements of set at
key. |
Set<String> |
sMembers(String key)
Get all elements of set at
key. |
List<Boolean> |
sMIsMember(byte[] key,
byte[]... values)
Check if set at
key contains one or more values. |
List<Boolean> |
sMIsMember(String key,
String... values)
Check if set at
key contains one or more values. |
Boolean |
sMove(byte[] srcKey,
byte[] destKey,
byte[] value)
Move
value from srcKey to destKey |
Boolean |
sMove(String srcKey,
String destKey,
String value)
Move
value from srcKey to destKey |
List<byte[]> |
sort(byte[] key,
SortParameters params)
Sort the elements for
key. |
Long |
sort(byte[] key,
SortParameters params,
byte[] storeKey)
Sort the elements for
key and store result in storeKey. |
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. |
byte[] |
sPop(byte[] key)
Remove and return a random member from set at
key. |
List<byte[]> |
sPop(byte[] key,
long count)
Remove and return
count random members from set at key. |
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. |
byte[] |
sRandMember(byte[] key)
Get random element from set at
key. |
List<byte[]> |
sRandMember(byte[] key,
long count)
Get
count random elements 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(byte[] key,
byte[]... values)
Remove given
values from set at key and return the number of removed elements. |
Long |
sRem(String key,
String... values)
Remove given
values from set at key and return the number of removed elements. |
Cursor<byte[]> |
sScan(byte[] key,
ScanOptions options)
Use a
Cursor to iterate over elements in set at key. |
Cursor<String> |
sScan(String key,
ScanOptions options)
Use a
Cursor to iterate over elements in set at key. |
Long |
strLen(byte[] key)
Get the length of the value stored at
key. |
Long |
strLen(String key)
Get the length of the value stored at
key. |
void |
subscribe(MessageListener listener,
byte[]... channels)
Subscribes the connection to the given channels.
|
void |
subscribe(MessageListener listener,
String... channels)
Subscribes the connection to the given channels.
|
Set<byte[]> |
sUnion(byte[]... keys)
Union all sets at given
keys. |
Set<String> |
sUnion(String... keys)
Union all sets at given
keys. |
Long |
sUnionStore(byte[] destKey,
byte[]... keys)
Union all sets at given
keys and store result in destKey. |
Long |
sUnionStore(String destKey,
String... keys)
Union all sets at given
keys and store result in destKey. |
Long |
time()
Request server timestamp using
TIME command in TimeUnit.MILLISECONDS. |
Long |
time(TimeUnit timeUnit)
Request server timestamp using
TIME command. |
Long |
touch(byte[]... keys)
Alter the last access time of given
key(s). |
Long |
touch(String... keys)
Alter the last access time of given
key(s). |
Long |
ttl(byte[] key)
Get the time to live for
key in seconds. |
Long |
ttl(byte[] key,
TimeUnit timeUnit)
Get the time to live for
key in and convert it to the given TimeUnit. |
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(byte[] key)
Determine the type stored at
key. |
DataType |
type(String key)
Determine the type stored at
key. |
Long |
unlink(byte[]... keys)
Unlink the
keys from the keyspace. |
Long |
unlink(String... keys)
Unlink the
keys from the keyspace. |
void |
unwatch()
Flushes all the previously
#watch(byte[]...) keys. |
void |
watch(byte[]... keys)
Watch given
keys for modifications during transaction started with RedisTxCommands.multi(). |
Long |
xAck(byte[] key,
String group,
RecordId... recordIds)
Acknowledge one or more records, identified via their id, as processed.
|
Long |
xAck(String key,
String group,
RecordId... recordIds) |
RecordId |
xAdd(MapRecord<byte[],byte[],byte[]> record,
RedisStreamCommands.XAddOptions options)
Append the given
record 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(). |
List<ByteRecord> |
xClaim(byte[] key,
String group,
String newOwner,
RedisStreamCommands.XClaimOptions options)
Change the ownership of a pending message to the given new consumer.
|
List<StringRecord> |
xClaim(String key,
String group,
String consumer,
RedisStreamCommands.XClaimOptions options)
Change the ownership of a pending message to the given new consumer.
|
List<RecordId> |
xClaimJustId(byte[] 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.
|
List<RecordId> |
xClaimJustId(String key,
String group,
String consumer,
RedisStreamCommands.XClaimOptions options)
Change the ownership of a pending message to the given new consumer without increasing the delivered
count.
|
Long |
xDel(byte[] key,
RecordId... recordIds)
Removes the records with the given id's from the stream.
|
Long |
xDel(String key,
RecordId... recordIds) |
String |
xGroupCreate(byte[] key,
String groupName,
ReadOffset readOffset)
Create a consumer group.
|
String |
xGroupCreate(byte[] key,
String groupName,
ReadOffset readOffset,
boolean mkStream)
Create a consumer group.
|
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(byte[] key,
Consumer consumer)
Delete a consumer from a consumer group.
|
Boolean |
xGroupDelConsumer(String key,
Consumer consumer)
Delete a consumer from a consumer group.
|
Boolean |
xGroupDestroy(byte[] key,
String groupName)
Destroy a consumer group.
|
Boolean |
xGroupDestroy(String key,
String group)
Destroy a consumer group.
|
StreamInfo.XInfoStream |
xInfo(byte[] key)
Obtain general information about the stream stored at the specified key.
|
StreamInfo.XInfoStream |
xInfo(String key)
Obtain general information about the stream stored at the specified key.
|
StreamInfo.XInfoConsumers |
xInfoConsumers(byte[] key,
String groupName)
Obtain information about every consumer in a specific consumer group for 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(byte[] key)
Obtain information about consumer groups associated with 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(byte[] key)
Get the length of a stream.
|
Long |
xLen(String key)
Get the length of a stream.
|
PendingMessagesSummary |
xPending(byte[] key,
String groupName)
Obtain the
PendingMessagesSummary for a given consumer group. |
PendingMessages |
xPending(byte[] key,
String groupName,
RedisStreamCommands.XPendingOptions options)
|
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 consumer,
Range<String> range,
Long count)
|
List<ByteRecord> |
xRange(byte[] key,
Range<String> range,
RedisZSetCommands.Limit limit)
|
List<StringRecord> |
xRange(String key,
Range<String> range,
RedisZSetCommands.Limit limit)
Read records from a stream within a specific
Range applying a Limit. |
List<ByteRecord> |
xRead(StreamReadOptions readOptions,
StreamOffset<byte[]>... streams)
Read records from one or more
StreamOffsets. |
List<StringRecord> |
xReadAsString(StreamReadOptions readOptions,
StreamOffset<String>... streams)
Read records from one or more
StreamOffsets. |
List<ByteRecord> |
xReadGroup(Consumer consumer,
StreamReadOptions readOptions,
StreamOffset<byte[]>... streams)
Read records from one or more
StreamOffsets using a consumer group. |
List<StringRecord> |
xReadGroupAsString(Consumer consumer,
StreamReadOptions readOptions,
StreamOffset<String>... streams)
Read records from one or more
StreamOffsets using a consumer group. |
List<ByteRecord> |
xRevRange(byte[] key,
Range<String> range,
RedisZSetCommands.Limit limit)
Read records from a stream within a specific
Range applying a RedisZSetCommands.Limit 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(byte[] key,
long count)
Trims the stream to
count elements. |
Long |
xTrim(byte[] key,
long count,
boolean approximateTrimming)
Trims the stream to
count elements. |
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(byte[] key,
double score,
byte[] value,
RedisZSetCommands.ZAddArgs args)
|
Long |
zAdd(byte[] key,
Set<RedisZSetCommands.Tuple> tuples,
RedisZSetCommands.ZAddArgs args)
|
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(byte[] key)
Get the size of sorted set with
key. |
Long |
zCard(String key)
Get the size of sorted set with
key. |
Long |
zCount(byte[] key,
double min,
double max)
Count number of elements within sorted set with scores between
min and max. |
Long |
zCount(byte[] key,
RedisZSetCommands.Range range)
Count number of elements within sorted set with scores between
Range#min and Range#max. |
Long |
zCount(String key,
double min,
double max)
Count number of elements within sorted set with scores between
min and max. |
Set<byte[]> |
zDiff(byte[]... sets)
Diff sorted
sets. |
Set<String> |
zDiff(String... sets)
Diff sorted
sets. |
Long |
zDiffStore(byte[] destKey,
byte[]... sets)
Diff sorted
sets and store result in destination destKey. |
Long |
zDiffStore(String destKey,
String... sets)
Diff sorted
sets and store result in destination destKey. |
Set<RedisZSetCommands.Tuple> |
zDiffWithScores(byte[]... sets)
Diff sorted
sets. |
Set<StringRedisConnection.StringTuple> |
zDiffWithScores(String... sets)
Diff sorted
sets. |
Double |
zIncrBy(byte[] key,
double increment,
byte[] value)
Increment the score of element with
value in sorted set by increment. |
Double |
zIncrBy(String key,
double increment,
String value)
Increment the score of element with
value in sorted set by increment. |
Set<byte[]> |
zInter(byte[]... sets)
Intersect sorted
sets. |
Set<String> |
zInter(String... sets)
Intersect sorted
sets. |
Long |
zInterStore(byte[] destKey,
byte[]... sets)
Intersect sorted
sets and store result in destination destKey. |
Long |
zInterStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
RedisZSetCommands.Weights weights,
byte[]... sets)
Intersect sorted
sets and store result in destination destKey. |
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. |
Set<RedisZSetCommands.Tuple> |
zInterWithScores(byte[]... sets)
Intersect sorted
sets. |
Set<RedisZSetCommands.Tuple> |
zInterWithScores(RedisZSetCommands.Aggregate aggregate,
RedisZSetCommands.Weights weights,
byte[]... 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(byte[] key,
RedisZSetCommands.Range range)
Count number of elements within sorted set with value between
Range#min and Range#max applying
lexicographical ordering. |
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(byte[] key,
byte[]... values)
Get the scores of elements with
values from sorted set with key key. |
List<Double> |
zMScore(String key,
String... values)
Get the scores of elements with
values from sorted set with key key. |
RedisZSetCommands.Tuple |
zPopMax(byte[] key)
Remove and return the value with its score having the highest score from sorted set at
key. |
Set<RedisZSetCommands.Tuple> |
zPopMax(byte[] key,
long count)
Remove and return
count values with their score having the highest score from sorted set at 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(byte[] key)
Remove and return the value with its score having the lowest score from sorted set at
key. |
Set<RedisZSetCommands.Tuple> |
zPopMin(byte[] key,
long count)
Remove and return
count values with their score having the lowest score from sorted set at key. |
StringRedisConnection.StringTuple |
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. |
byte[] |
zRandMember(byte[] key)
Get random element from sorted set at
key. |
List<byte[]> |
zRandMember(byte[] key,
long count)
Get
count random elements 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. |
RedisZSetCommands.Tuple |
zRandMemberWithScore(byte[] key)
Get random element from sorted set at
key. |
List<RedisZSetCommands.Tuple> |
zRandMemberWithScore(byte[] 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<byte[]> |
zRange(byte[] key,
long start,
long end)
Get elements between
start and end from sorted set. |
Set<String> |
zRange(String key,
long start,
long end)
Get elements between
start and end from sorted set. |
Set<byte[]> |
zRangeByLex(byte[] key)
Get all the elements in the sorted set at key in lexicographical ordering.
|
Set<byte[]> |
zRangeByLex(byte[] key,
RedisZSetCommands.Range range)
Get all the elements in
RedisZSetCommands.Range from the sorted set at key in lexicographical ordering. |
Set<byte[]> |
zRangeByLex(byte[] key,
RedisZSetCommands.Range range,
RedisZSetCommands.Limit limit)
Get all the elements in
RedisZSetCommands.Range from the sorted set at key in lexicographical ordering. |
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<byte[]> |
zRangeByScore(byte[] key,
double min,
double max)
Get elements where score is between
min and max from sorted set. |
Set<byte[]> |
zRangeByScore(byte[] 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<byte[]> |
zRangeByScore(byte[] key,
RedisZSetCommands.Range range)
Get elements where score is between
Range#min and Range#max from sorted set. |
Set<byte[]> |
zRangeByScore(byte[] key,
RedisZSetCommands.Range range,
RedisZSetCommands.Limit limit)
Get elements in range from
Limit#count to Limit#offset where score is between Range#min and
Range#max from sorted set. |
Set<byte[]> |
zRangeByScore(byte[] key,
String min,
String max)
Get elements where score is between
min and max from sorted set. |
Set<byte[]> |
zRangeByScore(byte[] 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<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<RedisZSetCommands.Tuple> |
zRangeByScoreWithScores(byte[] key,
double min,
double max)
|
Set<RedisZSetCommands.Tuple> |
zRangeByScoreWithScores(byte[] key,
double min,
double max,
long offset,
long count)
Get set of
RedisZSetCommands.Tuples in range from start to end where score is between min and
max from sorted set. |
Set<RedisZSetCommands.Tuple> |
zRangeByScoreWithScores(byte[] key,
RedisZSetCommands.Range range)
|
Set<RedisZSetCommands.Tuple> |
zRangeByScoreWithScores(byte[] key,
RedisZSetCommands.Range range,
RedisZSetCommands.Limit limit)
Get set of
RedisZSetCommands.Tuples in range from Limit#offset to Limit#offset + Limit#count where score is
between Range#min and Range#max from sorted set. |
Set<StringRedisConnection.StringTuple> |
zRangeByScoreWithScores(String key,
double min,
double max)
Get set of
Tuples 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
Tuples in range from start to end where score is between min and
max from sorted set. |
Set<RedisZSetCommands.Tuple> |
zRangeWithScores(byte[] key,
long start,
long end)
|
Set<StringRedisConnection.StringTuple> |
zRangeWithScores(String key,
long start,
long end)
Get set of
Tuples between start and end from sorted set. |
Long |
zRank(byte[] key,
byte[] value)
Determine the index of element with
value in a sorted set. |
Long |
zRank(String key,
String value)
Determine the index of element with
value in a sorted set. |
Long |
zRem(byte[] key,
byte[]... values)
Remove
values from sorted set. |
Long |
zRem(String key,
String... values)
Remove
values from sorted set. |
Long |
zRemRange(byte[] key,
long start,
long end)
Remove elements in range between
start and end from sorted set with key. |
Long |
zRemRange(String key,
long start,
long end)
Remove elements in range between
start and end from sorted set with key. |
Long |
zRemRangeByLex(byte[] key,
RedisZSetCommands.Range range)
Remove all elements between the lexicographical
RedisZSetCommands.Range. |
Long |
zRemRangeByLex(String key,
RedisZSetCommands.Range range)
Remove all elements between the lexicographical
Range. |
Long |
zRemRangeByScore(byte[] key,
double min,
double max)
Remove elements with scores between
min and max from sorted set with key. |
Long |
zRemRangeByScore(byte[] key,
RedisZSetCommands.Range range)
Remove elements with scores between
Range#min and Range#max from sorted set with key. |
Long |
zRemRangeByScore(String key,
double min,
double max)
Remove elements with scores between
min and max from sorted set with key. |
Set<byte[]> |
zRevRange(byte[] key,
long start,
long end)
Get elements in range from
start to end from sorted set ordered from high to low. |
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. |
Set<byte[]> |
zRevRangeByLex(byte[] key,
RedisZSetCommands.Range range,
RedisZSetCommands.Limit limit)
Get all the elements in
RedisZSetCommands.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<byte[]> |
zRevRangeByScore(byte[] key,
double min,
double max)
Get elements where score is between
min and max from sorted set ordered from high to low. |
Set<byte[]> |
zRevRangeByScore(byte[] 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<byte[]> |
zRevRangeByScore(byte[] key,
RedisZSetCommands.Range range)
Get elements where score is between
Range#min and Range#max from sorted set ordered from high to
low. |
Set<byte[]> |
zRevRangeByScore(byte[] key,
RedisZSetCommands.Range range,
RedisZSetCommands.Limit limit)
Get elements in range from
Limit#offset to Limit#offset + Limit#count where score is between
Range#min and Range#max from sorted set ordered high -> low. |
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<RedisZSetCommands.Tuple> |
zRevRangeByScoreWithScores(byte[] key,
double min,
double max)
Get set of
RedisZSetCommands.Tuple where score is between min and max from sorted set ordered from high to
low. |
Set<RedisZSetCommands.Tuple> |
zRevRangeByScoreWithScores(byte[] key,
double min,
double max,
long offset,
long count)
Get set of
RedisZSetCommands.Tuple in range from start to end where score is between min and
max from sorted set ordered high -> low. |
Set<RedisZSetCommands.Tuple> |
zRevRangeByScoreWithScores(byte[] key,
RedisZSetCommands.Range range)
Get set of
RedisZSetCommands.Tuple where score is between Range#min and Range#max from sorted set ordered
from high to low. |
Set<RedisZSetCommands.Tuple> |
zRevRangeByScoreWithScores(byte[] key,
RedisZSetCommands.Range range,
RedisZSetCommands.Limit limit)
Get set of
RedisZSetCommands.Tuple in range from Limit#offset to Limit#count where score is between
Range#min and Range#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<RedisZSetCommands.Tuple> |
zRevRangeWithScores(byte[] key,
long start,
long end)
Get set of
RedisZSetCommands.Tuples in range from start to end from sorted set ordered from high to low. |
Set<StringRedisConnection.StringTuple> |
zRevRangeWithScores(String key,
long start,
long end)
Get set of
Tuples in range from start to end from sorted set ordered from high to low. |
Long |
zRevRank(byte[] key,
byte[] value)
Determine the index of element with
value in a sorted set when scored 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<RedisZSetCommands.Tuple> |
zScan(byte[] key,
ScanOptions options)
Use a
Cursor to iterate over elements in sorted set at key. |
Cursor<StringRedisConnection.StringTuple> |
zScan(String key,
ScanOptions options)
Use a
Cursor to iterate over elements in sorted set at key. |
Double |
zScore(byte[] key,
byte[] value)
Get the score of element with
value from sorted set with key key. |
Double |
zScore(String key,
String value)
Get the score of element with
value from sorted set with key key. |
Set<byte[]> |
zUnion(byte[]... sets)
Union sorted
sets. |
Set<String> |
zUnion(String... sets)
Union sorted
sets. |
Long |
zUnionStore(byte[] destKey,
byte[]... sets)
Union sorted
sets. |
Long |
zUnionStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
RedisZSetCommands.Weights weights,
byte[]... sets)
Union sorted
sets and store result in destination destKey. |
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. |
Set<RedisZSetCommands.Tuple> |
zUnionWithScores(byte[]... sets)
Union sorted
sets. |
Set<RedisZSetCommands.Tuple> |
zUnionWithScores(RedisZSetCommands.Aggregate aggregate,
RedisZSetCommands.Weights weights,
byte[]... 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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbitPos, entryIds, lPos, xAck, xAdd, xAdd, xClaim, xDel, xRange, xReadAsString, xReadAsString, xReadAsString, xReadGroupAsString, xReadGroupAsString, xReadGroupAsString, xRevRange, zInterWithScores, zRevRangeByLex, zRevRangeByLex, zUnionWithScoresgeoCommands, hashCommands, hyperLogLogCommands, keyCommands, listCommands, scriptingCommands, serverCommands, setCommands, streamCommands, stringCommands, zSetCommandsrestore, scanbitPoslPoszAdd, zAdd, zInterStore, zInterWithScores, zRevRangeByLex, zRevRangeByLex, zUnionStore, zUnionWithScorespublic DefaultStringRedisConnection(RedisConnection connection)
DefaultStringRedisConnection instance. Uses StringRedisSerializer as
underlying serializer.connection - Redis connectionpublic DefaultStringRedisConnection(RedisConnection connection, RedisSerializer<String> serializer)
DefaultStringRedisConnection instance.connection - Redis connectionserializer - String serializerpublic Long append(byte[] key, byte[] value)
RedisStringCommandsvalue to key.append in interface RedisStringCommandskey - must not be null.value - must not be null.public void bgSave()
RedisServerCommandsbgSave in interface RedisServerCommandspublic void bgReWriteAof()
RedisServerCommandsbgReWriteAof in interface RedisServerCommands@Deprecated public void bgWriteAof()
bgReWriteAof().RedisServerCommandsbgWriteAof in interface RedisServerCommandspublic List<byte[]> bLPop(int timeout, byte[]... keys)
RedisListCommandskeys. timeout reached.bLPop in interface RedisListCommandstimeout - seconds to block.keys - must not be null.List when no element could be popped and the timeout was reached. null when used
in pipeline / transaction.RedisListCommands.lPop(byte[])public List<byte[]> bRPop(int timeout, byte[]... keys)
RedisListCommandskeys. timeout reached.bRPop in interface RedisListCommandstimeout - seconds to block.keys - must not be null.List when no element could be popped and the timeout was reached. null when used
in pipeline / transaction.RedisListCommands.rPop(byte[])public byte[] bRPopLPush(int timeout,
byte[] srcKey,
byte[] dstKey)
RedisListCommandssrcKey, append it to dstKey and return its value. timeout reached.bRPopLPush in interface RedisListCommandstimeout - seconds to block.srcKey - must not be null.dstKey - must not be null.RedisListCommands.rPopLPush(byte[], byte[])public void close()
throws RedisSystemException
RedisConnectionclose in interface AutoCloseableclose in interface RedisConnectionRedisSystemExceptionpublic Boolean copy(byte[] sourceKey, byte[] targetKey, boolean replace)
RedisKeyCommandssourceKey to targetKey.copy in interface RedisKeyCommandssourceKey - must not be null.targetKey - must not be null.replace - whether to replace existing keys.public Long dbSize()
RedisServerCommandsdbSize in interface RedisServerCommandspublic Long decr(byte[] key)
RedisStringCommandskey by 1.decr in interface RedisStringCommandskey - must not be null.public Long decrBy(byte[] key, long value)
RedisStringCommandskey by value.decrBy in interface RedisStringCommandskey - must not be null.public Long del(byte[]... keys)
RedisKeyCommandskeys.del in interface RedisKeyCommandskeys - must not be null.public Long unlink(byte[]... keys)
RedisKeyCommandskeys from the keyspace. Unlike with #del(byte[]...) the actual memory reclaiming here
happens asynchronously.unlink in interface RedisKeyCommandskeys - must not be null.public void discard()
RedisTxCommandsRedisTxCommands.multi().discard in interface RedisTxCommandspublic byte[] echo(byte[] message)
RedisConnectionCommandsmessage via server roundtrip.echo in interface RedisConnectionCommandsmessage - the message to echo.public List<Object> exec()
RedisTxCommandsRedisTxCommands.multi(). #watch(byte[]...) the operation will fail if any of watched keys has been modified.exec in interface RedisTxCommandspublic Boolean exists(byte[] key)
RedisKeyCommandskey exists.exists in interface RedisKeyCommandskey - must not be null.public Long exists(String... keys)
StringRedisConnectionkeys exist.exists in interface StringRedisConnectionkeys - must not be null.RedisKeyCommands.exists(byte[][])public Long exists(byte[]... keys)
RedisKeyCommandskeys exist. Providing the very same key more than once also counts
multiple times.exists in interface RedisKeyCommandskeys - must not be null.public Boolean expire(byte[] key, long seconds)
RedisKeyCommandskey in seconds.expire in interface RedisKeyCommandskey - must not be null.public Boolean expireAt(byte[] key, long unixTime)
RedisKeyCommandskey as a UNIX timestamp.expireAt in interface RedisKeyCommandskey - must not be null.public void flushAll()
RedisServerCommandsflushAll in interface RedisServerCommandspublic void flushDb()
RedisServerCommandsflushDb in interface RedisServerCommandspublic byte[] get(byte[] key)
RedisStringCommandskey.get in interface RedisStringCommandskey - must not be null.@Nullable public byte[] getDel(byte[] key)
RedisStringCommandskey and delete the key.getDel in interface RedisStringCommandskey - must not be null.@Nullable public String getDel(String key)
StringRedisConnectionkey and delete the key.getDel in interface StringRedisConnectionkey - must not be null.@Nullable public byte[] getEx(byte[] key, Expiration expiration)
RedisStringCommandskey and expire the key by applying Expiration.
Use Expiration.seconds(long) for EX.
Use Expiration.milliseconds(long) for PX.
Use Expiration.unixTimestamp(long, TimeUnit) for EXAT | PXAT.
getEx in interface RedisStringCommandskey - must not be null.expiration - must not be null.@Nullable public String getEx(String key, Expiration expiration)
StringRedisConnectionkey and expire the key by applying Expiration.getEx in interface StringRedisConnectionkey - must not be null.expiration - must not be null.public Boolean getBit(byte[] key, long offset)
RedisStringCommandsoffset of value at key.getBit in interface RedisStringCommandskey - must not be null.public Properties getConfig(String pattern)
RedisServerCommandspattern from server.getConfig in interface RedisServerCommandspattern - must not be null.public Object getNativeConnection()
RedisConnectiongetNativeConnection in interface RedisConnectionpublic byte[] getRange(byte[] key,
long start,
long end)
RedisStringCommandskey between start and end.getRange in interface RedisStringCommandskey - must not be null.public byte[] getSet(byte[] key,
byte[] value)
RedisStringCommandsvalue of key and return its old value.getSet in interface RedisStringCommandskey - must not be null.value - must not be null.public Subscription getSubscription()
RedisPubSubCommandsgetSubscription in interface RedisPubSubCommandspublic Long hDel(byte[] key, byte[]... fields)
RedisHashCommandsfields.hDel in interface RedisHashCommandskey - must not be null.fields - must not be empty.public Boolean hExists(byte[] key, byte[] field)
RedisHashCommandsfield exists.hExists in interface RedisHashCommandskey - must not be null.field - must not be null.public byte[] hGet(byte[] key,
byte[] field)
RedisHashCommandsfield from hash at key.hGet in interface RedisHashCommandskey - must not be null.field - must not be null.public Map<byte[],byte[]> hGetAll(byte[] key)
RedisHashCommandskey.hGetAll in interface RedisHashCommandskey - must not be null.Map if key does not exist or null when used in pipeline / transaction.public Long hIncrBy(byte[] key, byte[] field, long delta)
RedisHashCommandsvalue of a hash field by the given delta.hIncrBy in interface RedisHashCommandskey - must not be null.field - must not be null.public Double hIncrBy(byte[] key, byte[] field, double delta)
RedisHashCommandsvalue of a hash field by the given delta.hIncrBy in interface RedisHashCommandskey - must not be null.field - must not be null.public Set<byte[]> hKeys(byte[] key)
RedisHashCommandskey.hKeys in interface RedisHashCommandskey - must not be null.public Long hLen(byte[] key)
RedisHashCommandskey.hLen in interface RedisHashCommandskey - must not be null.public List<byte[]> hMGet(byte[] key, byte[]... fields)
RedisHashCommandsfields from hash at key. Values are in the order of the requested keys Absent
field values are represented using null in the resulting List.hMGet in interface RedisHashCommandskey - must not be null.fields - must not be empty.List if key does not exist. null when used in pipeline / transaction.public void hMSet(byte[] key,
Map<byte[],byte[]> hashes)
RedisHashCommandshasheshMSet in interface RedisHashCommandskey - must not be null.hashes - must not be null.public Boolean hSet(byte[] key, byte[] field, byte[] value)
RedisHashCommandsvalue of a hash field.hSet in interface RedisHashCommandskey - must not be null.field - must not be null.value - must not be null.public Boolean hSetNX(byte[] key, byte[] field, byte[] value)
RedisHashCommandsvalue of a hash field only if field does not exist.hSetNX in interface RedisHashCommandskey - must not be null.field - must not be null.value - must not be null.public List<byte[]> hVals(byte[] key)
RedisHashCommandsfield.hVals in interface RedisHashCommandskey - must not be null.List if key does not exist. null when used in pipeline / transaction.public Long incr(byte[] key)
RedisStringCommandskey by 1.incr in interface RedisStringCommandskey - must not be null.public Long incrBy(byte[] key, long value)
RedisStringCommandskey by delta.incrBy in interface RedisStringCommandskey - must not be null.public Double incrBy(byte[] key, double value)
RedisStringCommandskey by delta.incrBy in interface RedisStringCommandskey - must not be null.public Properties info()
RedisServerCommandsinfo in interface RedisServerCommandspublic Properties info(String section)
RedisServerCommandsselection.info in interface RedisServerCommandspublic boolean isClosed()
RedisConnectionisClosed in interface RedisConnectionpublic boolean isQueueing()
RedisConnectionisQueueing in interface RedisConnectionpublic boolean isSubscribed()
RedisPubSubCommandsisSubscribed in interface RedisPubSubCommandspublic Set<byte[]> keys(byte[] pattern)
RedisKeyCommandspattern.keys in interface RedisKeyCommandspattern - must not be null.Set if no match found. null when used in pipeline / transaction.public Long lastSave()
RedisServerCommandsRedisServerCommands.bgSave() operation in seconds.lastSave in interface RedisServerCommandspublic byte[] lIndex(byte[] key,
long index)
RedisListCommandsindex form list at key.lIndex in interface RedisListCommandskey - must not be null.index - zero based index value. Use negative number to designate elements starting at the tail.public Long lInsert(byte[] key, RedisListCommands.Position where, byte[] pivot, byte[] value)
RedisListCommandsvalue RedisListCommands.Position.BEFORE or RedisListCommands.Position.AFTER existing pivot for key.lInsert in interface RedisListCommandskey - must not be null.where - must not be null.pivot - must not be null.value - must not be null.public byte[] lMove(byte[] sourceKey,
byte[] destinationKey,
RedisListCommands.Direction from,
RedisListCommands.Direction to)
RedisListCommandsfrom 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.lMove in interface RedisListCommandssourceKey - 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)public byte[] bLMove(byte[] sourceKey,
byte[] destinationKey,
RedisListCommands.Direction from,
RedisListCommands.Direction to,
double timeout)
RedisListCommandsfrom 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.
Blocks connection until element available or timeout reached.
bLMove in interface RedisListCommandssourceKey - must not be null.destinationKey - must not be null.from - must not be null.to - must not be null.RedisListCommands.lMove(byte[], byte[], Direction, Direction)public String lMove(String sourceKey, String destinationKey, RedisListCommands.Direction from, RedisListCommands.Direction to)
StringRedisConnectionfrom 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.lMove in interface StringRedisConnectionsourceKey - 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)public String bLMove(String sourceKey, String destinationKey, RedisListCommands.Direction from, RedisListCommands.Direction to, double timeout)
StringRedisConnectionfrom 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.bLMove in interface StringRedisConnectionsourceKey - must not be null.destinationKey - must not be null.from - must not be null.to - must not be null.RedisListCommands.lMove(byte[], byte[], Direction, Direction),
RedisListCommands.bLMove(byte[], byte[], Direction, Direction, double)public Long lLen(byte[] key)
RedisListCommandskey.lLen in interface RedisListCommandskey - must not be null.public byte[] lPop(byte[] key)
RedisListCommandskey.lPop in interface RedisListCommandskey - must not be null.public List<byte[]> lPop(byte[] key, long count)
RedisListCommandskey.lPop in interface RedisListCommandskey - must not be null.public List<Long> lPos(byte[] key, byte[] element, @Nullable Integer rank, @Nullable Integer count)
RedisListCommandslPos in interface RedisListCommandskey - 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.public Long lPush(byte[] key, byte[]... values)
RedisListCommandsvalues to key.lPush in interface RedisListCommandskey - must not be null.values - must not be empty.public Long lPushX(byte[] key, byte[] value)
RedisListCommandsvalues to key only if the list exists.lPushX in interface RedisListCommandskey - must not be null.value - must not be null.public List<byte[]> lRange(byte[] key, long start, long end)
RedisListCommandsstart and end from list at key.lRange in interface RedisListCommandskey - must not be null.List if key does not exists or range does not contain values. null when used in
pipeline / transaction.public Long lRem(byte[] key, long count, byte[] value)
RedisListCommandscount occurrences of value from the list stored at key.lRem in interface RedisListCommandskey - must not be null.public void lSet(byte[] key,
long index,
byte[] value)
RedisListCommandsvalue list element at index.lSet in interface RedisListCommandskey - must not be null.public void lTrim(byte[] key,
long start,
long end)
RedisListCommandskey to elements between start and end.lTrim in interface RedisListCommandskey - must not be null.public List<byte[]> mGet(byte[]... keys)
RedisStringCommandskeys. Values are in the order of the requested keys Absent field values are represented using
null in the resulting List.mGet in interface RedisStringCommandskeys - must not be null.null when used in pipeline / transaction.public Boolean mSet(Map<byte[],byte[]> tuple)
RedisStringCommandstuple.mSet in interface RedisStringCommandstuple - must not be null.public Boolean mSetNX(Map<byte[],byte[]> tuple)
RedisStringCommandstuple only if the provided key does
not exist.mSetNX in interface RedisStringCommandstuple - must not be null.public void multi()
RedisTxCommandsRedisTxCommands.exec() or rolled back using RedisTxCommands.discard()multi in interface RedisTxCommandspublic Boolean persist(byte[] key)
RedisKeyCommandskey.persist in interface RedisKeyCommandskey - must not be null.public Boolean move(byte[] key, int dbIndex)
RedisKeyCommandskey to database with index.move in interface RedisKeyCommandskey - must not be null.public String ping()
RedisConnectionCommandsping in interface RedisConnectionCommandspublic void pSubscribe(MessageListener listener, byte[]... patterns)
RedisPubSubCommandsNote that this operation is blocking and the current thread starts waiting for new messages immediately.
pSubscribe in interface RedisPubSubCommandslistener - message listener, must not be null.patterns - channel name patterns, must not be null.public Long publish(byte[] channel, byte[] message)
RedisPubSubCommandspublish in interface RedisPubSubCommandschannel - the channel to publish to. Must not be null.message - message to publish. Must not be null.public byte[] randomKey()
RedisKeyCommandsrandomKey in interface RedisKeyCommandspublic void rename(byte[] oldKey,
byte[] newKey)
RedisKeyCommandsoldKey to newKey.rename in interface RedisKeyCommandsoldKey - must not be null.newKey - must not be null.public Boolean renameNX(byte[] oldKey, byte[] newKey)
RedisKeyCommandsoldKey to newKey only if newKey does not exist.renameNX in interface RedisKeyCommandsoldKey - must not be null.newKey - must not be null.public void resetConfigStats()
RedisServerCommandsRedisServerCommands.info().resetConfigStats in interface RedisServerCommandspublic void rewriteConfig()
RedisServerCommandsredis.conf file.rewriteConfig in interface RedisServerCommandspublic byte[] rPop(byte[] key)
RedisListCommandskey.rPop in interface RedisListCommandskey - must not be null.public List<byte[]> rPop(byte[] key, long count)
RedisListCommandskey.rPop in interface RedisListCommandskey - must not be null.public byte[] rPopLPush(byte[] srcKey,
byte[] dstKey)
RedisListCommandssrcKey, append it to dstKey and return its value.rPopLPush in interface RedisListCommandssrcKey - must not be null.dstKey - must not be null.public Long rPush(byte[] key, byte[]... values)
RedisListCommandsvalues to key.rPush in interface RedisListCommandskey - must not be null.values - must not be empty.public Long rPushX(byte[] key, byte[] value)
RedisListCommandsvalues to key only if the list exists.rPushX in interface RedisListCommandskey - must not be null.value - must not be null.public Long sAdd(byte[] key, byte[]... values)
RedisSetCommandsvalues to set at key.sAdd in interface RedisSetCommandskey - must not be null.values - must not be empty.public void save()
RedisServerCommandssave in interface RedisServerCommandspublic Long sCard(byte[] key)
RedisSetCommandskey.sCard in interface RedisSetCommandskey - must not be null.public Set<byte[]> sDiff(byte[]... keys)
RedisSetCommandskeys.sDiff in interface RedisSetCommandskeys - must not be null.public Long sDiffStore(byte[] destKey, byte[]... keys)
RedisSetCommandskeys and store result in destKey.sDiffStore in interface RedisSetCommandsdestKey - must not be null.keys - must not be null.public void select(int dbIndex)
RedisConnectionCommandsdbIndex.select in interface RedisConnectionCommandsdbIndex - the database index.public Boolean set(byte[] key, byte[] value)
RedisStringCommandsvalue for key.set in interface RedisStringCommandskey - must not be null.value - must not be null.public Boolean set(byte[] key, byte[] value, Expiration expiration, RedisStringCommands.SetOption option)
RedisStringCommandsvalue for key applying timeouts from expiration if set and inserting/updating values
depending on option.set in interface RedisStringCommandskey - must not be null.value - must not be null.expiration - must not be null. Use Expiration.persistent() to not set any ttl or
Expiration.keepTtl() to keep the existing expiration.option - must not be null. Use RedisStringCommands.SetOption.upsert() to add non existing.public Boolean setBit(byte[] key, long offset, boolean value)
RedisStringCommandsoffset in value stored at key.setBit in interface RedisStringCommandskey - must not be null.offset or null when used in pipeline / transaction.public void setConfig(String param, String value)
RedisServerCommandsparam to value.setConfig in interface RedisServerCommandsparam - must not be null.value - must not be null.public Boolean setEx(byte[] key, long seconds, byte[] value)
RedisStringCommandsvalue and expiration in seconds for key.setEx in interface RedisStringCommandskey - must not be null.value - must not be null.public Boolean pSetEx(byte[] key, long milliseconds, byte[] value)
RedisStringCommandsvalue and expiration in milliseconds for key.pSetEx in interface RedisStringCommandskey - must not be null.value - must not be null.public Boolean setNX(byte[] key, byte[] value)
RedisStringCommandsvalue for key, only if key does not exist.setNX in interface RedisStringCommandskey - must not be null.value - must not be null.public void setRange(byte[] key,
byte[] value,
long start)
RedisStringCommandskey starting at the specified offset with given value.setRange in interface RedisStringCommandskey - must not be null.public void shutdown()
RedisServerCommandsshutdown in interface RedisServerCommandspublic void shutdown(RedisServerCommands.ShutdownOption option)
RedisServerCommandsshutdown in interface RedisServerCommandspublic Set<byte[]> sInter(byte[]... keys)
RedisSetCommandskeys.sInter in interface RedisSetCommandskeys - must not be null.Set if no intersection found. null when used in pipeline / transaction.public Long sInterStore(byte[] destKey, byte[]... keys)
RedisSetCommandskeys and store result in destKey.sInterStore in interface RedisSetCommandsdestKey - must not be null.keys - must not be null.public Boolean sIsMember(byte[] key, byte[] value)
RedisSetCommandskey contains value.sIsMember in interface RedisSetCommandskey - must not be null.value - must not be null.public List<Boolean> sMIsMember(byte[] key, byte[]... values)
RedisSetCommandskey contains one or more values.sMIsMember in interface RedisSetCommandskey - must not be null.values - must not be null.public Set<byte[]> sMembers(byte[] key)
RedisSetCommandskey.sMembers in interface RedisSetCommandskey - must not be null.Set when key does not exist. null when used in pipeline / transaction.public Boolean sMove(byte[] srcKey, byte[] destKey, byte[] value)
RedisSetCommandsvalue from srcKey to destKeysMove in interface RedisSetCommandssrcKey - must not be null.destKey - must not be null.value - must not be null.public Long sort(byte[] key, SortParameters params, byte[] storeKey)
RedisKeyCommandskey and store result in storeKey.sort in interface RedisKeyCommandskey - must not be null.params - must not be null.storeKey - must not be null.public List<byte[]> sort(byte[] key, SortParameters params)
RedisKeyCommandskey.sort in interface RedisKeyCommandskey - must not be null.params - must not be null.public ValueEncoding encodingOf(byte[] key)
RedisKeyCommandskey.encodingOf in interface RedisKeyCommandskey - must not be null.ValueEncoding.RedisValueEncoding.VACANT if key does not
exist or null when used in pipeline / transaction.public Duration idletime(byte[] key)
RedisKeyCommandsDuration since the object stored at the given key is idle.idletime in interface RedisKeyCommandskey - must not be null.public Long refcount(byte[] key)
RedisKeyCommandskey.refcount in interface RedisKeyCommandskey - must not be null.public byte[] sPop(byte[] key)
RedisSetCommandskey.sPop in interface RedisSetCommandskey - must not be null.public List<byte[]> sPop(byte[] key, long count)
RedisSetCommandscount random members from set at key.sPop in interface RedisSetCommandskey - must not be null.count - number of random members to pop from the set.List if set does not exist. null when used in pipeline / transaction.public byte[] sRandMember(byte[] key)
RedisSetCommandskey.sRandMember in interface RedisSetCommandskey - must not be null.public List<byte[]> sRandMember(byte[] key, long count)
RedisSetCommandscount random elements from set at key.sRandMember in interface RedisSetCommandskey - must not be null.public Long sRem(byte[] key, byte[]... values)
RedisSetCommandsvalues from set at key and return the number of removed elements.sRem in interface RedisSetCommandskey - must not be null.values - must not be empty.public Long strLen(byte[] key)
RedisStringCommandskey.strLen in interface RedisStringCommandskey - must not be null.public Long bitCount(byte[] key)
RedisStringCommandskey.bitCount in interface RedisStringCommandskey - must not be null.public Long bitCount(byte[] key, long start, long end)
RedisStringCommandskey between start and
end.bitCount in interface RedisStringCommandskey - must not be null.public Long bitOp(RedisStringCommands.BitOperation op, byte[] destination, byte[]... keys)
RedisStringCommandsbitOp in interface RedisStringCommandsop - must not be null.destination - must not be null.keys - must not be null.@Nullable public Long bitPos(byte[] key, boolean bit, Range<Long> range)
RedisStringCommandsbit 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.bitPos in interface RedisStringCommandskey - 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.public void subscribe(MessageListener listener, byte[]... channels)
RedisPubSubCommandsNote that this operation is blocking and the current thread starts waiting for new messages immediately.
subscribe in interface RedisPubSubCommandslistener - message listener, must not be null.channels - channel names, must not be null.public Set<byte[]> sUnion(byte[]... keys)
RedisSetCommandskeys.sUnion in interface RedisSetCommandskeys - must not be null.Set if keys do not exist. null when used in pipeline / transaction.public Long sUnionStore(byte[] destKey, byte[]... keys)
RedisSetCommandskeys and store result in destKey.sUnionStore in interface RedisSetCommandsdestKey - must not be null.keys - must not be null.public Long ttl(byte[] key)
RedisKeyCommandskey in seconds.ttl in interface RedisKeyCommandskey - must not be null.public Long ttl(byte[] key, TimeUnit timeUnit)
RedisKeyCommandskey in and convert it to the given TimeUnit.ttl in interface RedisKeyCommandskey - must not be null.timeUnit - must not be null.public DataType type(byte[] key)
RedisKeyCommandskey.type in interface RedisKeyCommandskey - must not be null.public Long touch(byte[]... keys)
RedisKeyCommandskey(s).touch in interface RedisKeyCommandskeys - must not be null.public void unwatch()
RedisTxCommands#watch(byte[]...) keys.unwatch in interface RedisTxCommandspublic void watch(byte[]... keys)
RedisTxCommandskeys for modifications during transaction started with RedisTxCommands.multi().watch in interface RedisTxCommandskeys - must not be null.public Boolean zAdd(byte[] key, double score, byte[] value, RedisZSetCommands.ZAddArgs args)
RedisZSetCommandszAdd in interface RedisZSetCommandskey - must not be null.score - the score.value - the value.args - must not be null use RedisZSetCommands.ZAddArgs.empty() instead.public Long zAdd(byte[] key, Set<RedisZSetCommands.Tuple> tuples, RedisZSetCommands.ZAddArgs args)
RedisZSetCommandszAdd in interface RedisZSetCommandskey - must not be null.tuples - must not be null.args - must not be null use RedisZSetCommands.ZAddArgs.empty() instead.public Long zCard(byte[] key)
RedisZSetCommandskey.zCard in interface RedisZSetCommandskey - must not be null.public Long zCount(byte[] key, double min, double max)
RedisZSetCommandsmin and max.zCount in interface RedisZSetCommandskey - must not be null.public Long zCount(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandsRange#min and Range#max.zCount in interface RedisZSetCommandskey - must not be null.range - must not be null.public Double zIncrBy(byte[] key, double increment, byte[] value)
RedisZSetCommandsvalue in sorted set by increment.zIncrBy in interface RedisZSetCommandskey - must not be null.value - the value.@Nullable public Set<byte[]> zDiff(byte[]... sets)
RedisZSetCommandssets.zDiff in interface RedisZSetCommandssets - must not be null.@Nullable public Set<RedisZSetCommands.Tuple> zDiffWithScores(byte[]... sets)
RedisZSetCommandssets.zDiffWithScores in interface RedisZSetCommandssets - must not be null.@Nullable public Long zDiffStore(byte[] destKey, byte[]... sets)
RedisZSetCommandssets and store result in destination destKey.zDiffStore in interface RedisZSetCommandsdestKey - must not be null.sets - must not be null.@Nullable public Set<String> zDiff(String... sets)
StringRedisConnectionsets.zDiff in interface StringRedisConnectionsets - must not be null.@Nullable public Set<StringRedisConnection.StringTuple> zDiffWithScores(String... sets)
StringRedisConnectionsets.zDiffWithScores in interface StringRedisConnectionsets - must not be null.@Nullable public Long zDiffStore(String destKey, String... sets)
StringRedisConnectionsets and store result in destination destKey.zDiffStore in interface StringRedisConnectiondestKey - must not be null.sets - must not be null.@Nullable public Set<byte[]> zInter(byte[]... sets)
RedisZSetCommandssets.zInter in interface RedisZSetCommandssets - must not be null.@Nullable public Set<RedisZSetCommands.Tuple> zInterWithScores(byte[]... sets)
RedisZSetCommandssets.zInterWithScores in interface RedisZSetCommandssets - must not be null.@Nullable public Set<RedisZSetCommands.Tuple> zInterWithScores(RedisZSetCommands.Aggregate aggregate, RedisZSetCommands.Weights weights, byte[]... sets)
RedisZSetCommandssets.zInterWithScores in interface RedisZSetCommandsaggregate - must not be null.weights - must not be null.sets - must not be null.@Nullable public Set<String> zInter(String... sets)
StringRedisConnectionsets.zInter in interface StringRedisConnectionsets - must not be null.@Nullable public Set<StringRedisConnection.StringTuple> zInterWithScores(String... sets)
StringRedisConnectionsets.zInterWithScores in interface StringRedisConnectionsets - must not be null.@Nullable public Set<StringRedisConnection.StringTuple> zInterWithScores(RedisZSetCommands.Aggregate aggregate, RedisZSetCommands.Weights weights, String... sets)
StringRedisConnectionsets.zInterWithScores in interface StringRedisConnectionaggregate - must not be null.weights - must not be null.sets - must not be null.public Long zInterStore(byte[] destKey, RedisZSetCommands.Aggregate aggregate, RedisZSetCommands.Weights weights, byte[]... sets)
RedisZSetCommandssets and store result in destination destKey.zInterStore in interface RedisZSetCommandsdestKey - must not be null.aggregate - must not be null.weights - must not be null.sets - must not be null.public Long zInterStore(byte[] destKey, byte[]... sets)
RedisZSetCommandssets and store result in destination destKey.zInterStore in interface RedisZSetCommandsdestKey - must not be null.sets - must not be null.public Set<byte[]> zRange(byte[] key, long start, long end)
RedisZSetCommandsstart and end from sorted set.zRange in interface RedisZSetCommandskey - must not be null.Set when key does not exists or no members in range. null when used in pipeline /
transaction.public Set<byte[]> zRangeByScore(byte[] key, double min, double max, long offset, long count)
RedisZSetCommandsstart to end where score is between min and max from
sorted set.zRangeByScore in interface RedisZSetCommandskey - must not be null.Set when key does not exists or no members in range. null when used in pipeline /
transaction.public Set<byte[]> zRangeByScore(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandsRange#min and Range#max from sorted set.zRangeByScore in interface RedisZSetCommandskey - must not be null.range - must not be null.public Set<byte[]> zRangeByScore(byte[] key, RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
RedisZSetCommandsLimit#count to Limit#offset where score is between Range#min and
Range#max from sorted set.zRangeByScore in interface RedisZSetCommandskey - must not be null.range - must not be null.limit - must not be null.public Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandszRangeByScoreWithScores in interface RedisZSetCommandskey - must not be null.range - must not be null.Set when key does not exists or no members in range. null when used in pipeline /
transaction.public Set<byte[]> zRangeByScore(byte[] key, double min, double max)
RedisZSetCommandsmin and max from sorted set.zRangeByScore in interface RedisZSetCommandskey - must not be null.Set when key does not exists or no members in range. null when used in pipeline /
transaction.public Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count)
RedisZSetCommandsRedisZSetCommands.Tuples in range from start to end where score is between min and
max from sorted set.zRangeByScoreWithScores in interface RedisZSetCommandskey - must not be null.Set when key does not exists or no members in range. null when used in pipeline /
transaction.public Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key, RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
RedisZSetCommandsRedisZSetCommands.Tuples in range from Limit#offset to Limit#offset + Limit#count where score is
between Range#min and Range#max from sorted set.zRangeByScoreWithScores in interface RedisZSetCommandskey - must not be null.range - must not be null.limit - must not be null.Set when key does not exists or no members in range. null when used in pipeline /
transaction.public Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key, double min, double max)
RedisZSetCommandszRangeByScoreWithScores in interface RedisZSetCommandskey - must not be null.Set when key does not exists or no members in range. null when used in pipeline /
transaction.public Set<RedisZSetCommands.Tuple> zRangeWithScores(byte[] key, long start, long end)
RedisZSetCommandszRangeWithScores in interface RedisZSetCommandskey - must not be null.Set when key does not exists or no members in range. null when used in pipeline /
transaction.public Set<byte[]> zRevRangeByScore(byte[] key, double min, double max, long offset, long count)
RedisZSetCommandsstart to end where score is between min and max from
sorted set ordered high -> low.zRevRangeByScore in interface RedisZSetCommandskey - must not be null.public Set<byte[]> zRevRangeByScore(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandsRange#min and Range#max from sorted set ordered from high to
low.zRevRangeByScore in interface RedisZSetCommandskey - must not be null.range - must not be null.Set when key does not exists or no members in range. null when used in pipeline /
transaction.public Set<byte[]> zRevRangeByScore(byte[] key, double min, double max)
RedisZSetCommandsmin and max from sorted set ordered from high to low.zRevRangeByScore in interface RedisZSetCommandskey - must not be null.Set when key does not exists or no members in range. null when used in pipeline /
transaction.public Set<byte[]> zRevRangeByScore(byte[] key, RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
RedisZSetCommandsLimit#offset to Limit#offset + Limit#count where score is between
Range#min and Range#max from sorted set ordered high -> low.zRevRangeByScore in interface RedisZSetCommandskey - must not be null.range - must not be null.limit - must not be null.public Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count)
RedisZSetCommandsRedisZSetCommands.Tuple in range from start to end where score is between min and
max from sorted set ordered high -> low.zRevRangeByScoreWithScores in interface RedisZSetCommandskey - must not be null.public Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandsRedisZSetCommands.Tuple where score is between Range#min and Range#max from sorted set ordered
from high to low.zRevRangeByScoreWithScores in interface RedisZSetCommandskey - must not be null.range - must not be null.public Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] key, RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
RedisZSetCommandsRedisZSetCommands.Tuple in range from Limit#offset to Limit#count where score is between
Range#min and Range#max from sorted set ordered high -> low.zRevRangeByScoreWithScores in interface RedisZSetCommandskey - must not be null.range - must not be null.limit - must not be null.public Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] key, double min, double max)
RedisZSetCommandsRedisZSetCommands.Tuple where score is between min and max from sorted set ordered from high to
low.zRevRangeByScoreWithScores in interface RedisZSetCommandskey - must not be null.Set when key does not exists or no members in range. null when used in pipeline /
transaction.public Long zRank(byte[] key, byte[] value)
RedisZSetCommandsvalue in a sorted set.zRank in interface RedisZSetCommandskey - must not be null.value - the value. Must not be null.public Long zRem(byte[] key, byte[]... values)
RedisZSetCommandsvalues from sorted set. Return number of removed elements.zRem in interface RedisZSetCommandskey - must not be null.values - must not be null.public Long zRemRange(byte[] key, long start, long end)
RedisZSetCommandsstart and end from sorted set with key.zRemRange in interface RedisZSetCommandskey - must not be null.public Long zRemRangeByLex(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandsRedisZSetCommands.Range.zRemRangeByLex in interface RedisZSetCommandskey - must not be null.range - must not be null.public Long zRemRangeByScore(byte[] key, double min, double max)
RedisZSetCommandsmin and max from sorted set with key.zRemRangeByScore in interface RedisZSetCommandskey - must not be null.public Long zRemRangeByScore(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandsRange#min and Range#max from sorted set with key.zRemRangeByScore in interface RedisZSetCommandskey - must not be null.range - must not be null.public Set<byte[]> zRevRange(byte[] key, long start, long end)
RedisZSetCommandsstart to end from sorted set ordered from high to low.zRevRange in interface RedisZSetCommandskey - must not be null.Set when key does not exists or no members in range. null when used in pipeline /
transaction.public Set<RedisZSetCommands.Tuple> zRevRangeWithScores(byte[] key, long start, long end)
RedisZSetCommandsRedisZSetCommands.Tuples in range from start to end from sorted set ordered from high to low.zRevRangeWithScores in interface RedisZSetCommandskey - must not be null.Set when key does not exists or no members in range. null when used in pipeline /
transaction.public Long zRevRank(byte[] key, byte[] value)
RedisZSetCommandsvalue in a sorted set when scored high to low.zRevRank in interface RedisZSetCommandskey - must not be null.value - the value.public Double zScore(byte[] key, byte[] value)
RedisZSetCommandsvalue from sorted set with key key.zScore in interface RedisZSetCommandskey - must not be null.value - the value.public List<Double> zMScore(byte[] key, byte[]... values)
RedisZSetCommandsvalues from sorted set with key key.zMScore in interface RedisZSetCommandskey - must not be null.values - the values.@Nullable public Set<byte[]> zUnion(byte[]... sets)
RedisZSetCommandssets.zUnion in interface RedisZSetCommandssets - must not be null.@Nullable public Set<RedisZSetCommands.Tuple> zUnionWithScores(byte[]... sets)
RedisZSetCommandssets.zUnionWithScores in interface RedisZSetCommandssets - must not be null.@Nullable public Set<RedisZSetCommands.Tuple> zUnionWithScores(RedisZSetCommands.Aggregate aggregate, RedisZSetCommands.Weights weights, byte[]... sets)
RedisZSetCommandssets.zUnionWithScores in interface RedisZSetCommandsaggregate - must not be null.weights - must not be null.sets - must not be null.@Nullable public Set<String> zUnion(String... sets)
StringRedisConnectionsets.zUnion in interface StringRedisConnectionsets - must not be null.@Nullable public Set<StringRedisConnection.StringTuple> zUnionWithScores(String... sets)
StringRedisConnectionsets.zUnionWithScores in interface StringRedisConnectionsets - must not be null.@Nullable public Set<StringRedisConnection.StringTuple> zUnionWithScores(RedisZSetCommands.Aggregate aggregate, RedisZSetCommands.Weights weights, String... sets)
StringRedisConnectionsets.zUnionWithScores in interface StringRedisConnectionaggregate - must not be null.weights - must not be null.sets - must not be null.public Long zUnionStore(byte[] destKey, RedisZSetCommands.Aggregate aggregate, RedisZSetCommands.Weights weights, byte[]... sets)
RedisZSetCommandssets and store result in destination destKey.zUnionStore in interface RedisZSetCommandsdestKey - must not be null.aggregate - must not be null.weights - must not be null.sets - must not be null.public Long zUnionStore(byte[] destKey, byte[]... sets)
RedisZSetCommandssets.zUnionStore in interface RedisZSetCommandssets - must not be null.public Long zLexCount(String key, RedisZSetCommands.Range range)
StringRedisConnectionRange#min and Range#max applying
lexicographical ordering.zLexCount in interface StringRedisConnectionkey - must not be null.range - must not be null.RedisZSetCommands.zLexCount(byte[], Range)public Boolean pExpire(byte[] key, long millis)
RedisKeyCommandskey in milliseconds.pExpire in interface RedisKeyCommandskey - must not be null.public Boolean pExpireAt(byte[] key, long unixTimeInMillis)
RedisKeyCommandskey as a UNIX timestamp in milliseconds.pExpireAt in interface RedisKeyCommandskey - must not be null.public Long pTtl(byte[] key)
RedisKeyCommandskey in milliseconds.pTtl in interface RedisKeyCommandskey - must not be null.public Long pTtl(byte[] key, TimeUnit timeUnit)
RedisKeyCommandskey in and convert it to the given TimeUnit.pTtl in interface RedisKeyCommandskey - must not be null.timeUnit - must not be null.public byte[] dump(byte[] key)
RedisKeyCommandskey.dump in interface RedisKeyCommandskey - must not be null.public void restore(byte[] key,
long ttlInMillis,
byte[] serializedValue,
boolean replace)
RedisKeyCommandsrestore in interface RedisKeyCommandskey - must not be null.serializedValue - must not be null.replace - use true to replace a potentially existing value instead of erroring.public void scriptFlush()
RedisScriptingCommandsscriptFlush in interface RedisScriptingCommandspublic void scriptKill()
RedisScriptingCommandsscriptKill in interface RedisScriptingCommandspublic String scriptLoad(byte[] script)
RedisScriptingCommands#evalSha(byte[], ReturnType, int, byte[]...).scriptLoad in interface RedisScriptingCommandsscript - must not be null.public List<Boolean> scriptExists(String... scriptSha1)
RedisScriptingCommandsscriptShas exist in script cache.scriptExists in interface RedisScriptingCommandsList or null when used in pipeline /
transaction.public <T> T eval(byte[] script,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
RedisScriptingCommandsscript.eval in interface RedisScriptingCommandsscript - must not be null.returnType - must not be null.keysAndArgs - must not be null.public <T> T evalSha(String scriptSha1, ReturnType returnType, int numKeys, byte[]... keysAndArgs)
RedisScriptingCommandsscriptSha.evalSha in interface RedisScriptingCommandsscriptSha1 - must not be null.returnType - must not be null.keysAndArgs - must not be null.public <T> T evalSha(byte[] scriptSha1,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
RedisScriptingCommandsscriptSha.evalSha in interface RedisScriptingCommandsscriptSha1 - must not be null.returnType - must not be null.keysAndArgs - must not be null.public Long append(String key, String value)
StringRedisConnectionvalue to key.append in interface StringRedisConnectionkey - must not be null.RedisStringCommands.append(byte[], byte[])public List<String> bLPop(int timeout, String... keys)
StringRedisConnectionkeys (see: RedisListCommands.lPop(byte[])). timeout reached.bLPop in interface StringRedisConnectionkeys - must not be null.RedisListCommands#bLPop(int, byte[]...)public List<String> bRPop(int timeout, String... keys)
StringRedisConnectionkeys (see: RedisListCommands.rPop(byte[])). timeout reached.bRPop in interface StringRedisConnectionkeys - must not be null.RedisListCommands#bRPop(int, byte[]...)public String bRPopLPush(int timeout, String srcKey, String dstKey)
StringRedisConnectionsrcKey, append it to dstKey and return its value (see
RedisListCommands.rPopLPush(byte[], byte[])). timeout reached.bRPopLPush in interface StringRedisConnectionsrcKey - must not be null.dstKey - must not be null.RedisListCommands.bRPopLPush(int, byte[], byte[])public Boolean copy(String sourceKey, String targetKey, boolean replace)
StringRedisConnectionsourceKey to targetKey.copy in interface StringRedisConnectionsourceKey - must not be null.targetKey - must not be null.replace - whether to replace existing keys.RedisKeyCommands.copy(byte[], byte[], boolean)public Long decr(String key)
StringRedisConnectionkey by 1.decr in interface StringRedisConnectionkey - must not be null.RedisStringCommands.decr(byte[])public Long decrBy(String key, long value)
StringRedisConnectionkey by value.decrBy in interface StringRedisConnectionkey - must not be null.RedisStringCommands.decrBy(byte[], long)public Long del(String... keys)
StringRedisConnectionkeys.del in interface StringRedisConnectionkeys - must not be null.RedisKeyCommands#del(byte[]...)public Long unlink(String... keys)
StringRedisConnectionkeys from the keyspace. Unlike with StringRedisConnection.del(String...) the actual memory reclaiming here
happens asynchronously.unlink in interface StringRedisConnectionkeys - must not be null.public String echo(String message)
StringRedisConnectionmessage via server roundtrip.echo in interface StringRedisConnectionmessage - the message to echo.RedisConnectionCommands.echo(byte[])public Boolean exists(String key)
StringRedisConnectionkey exists.exists in interface StringRedisConnectionkey - must not be null.RedisKeyCommands.exists(byte[])public Boolean expire(String key, long seconds)
StringRedisConnectionkey in seconds.expire in interface StringRedisConnectionkey - must not be null.RedisKeyCommands.expire(byte[], long)public Boolean expireAt(String key, long unixTime)
StringRedisConnectionkey as a UNIX timestamp.expireAt in interface StringRedisConnectionkey - must not be null.RedisKeyCommands.expireAt(byte[], long)public String get(String key)
StringRedisConnectionkey.get in interface StringRedisConnectionkey - must not be null.RedisStringCommands.get(byte[])public Boolean getBit(String key, long offset)
StringRedisConnectionoffset of value at key.getBit in interface StringRedisConnectionkey - must not be null.RedisStringCommands.getBit(byte[], long)public String getRange(String key, long start, long end)
StringRedisConnectionkey between start and end.getRange in interface StringRedisConnectionkey - must not be null.RedisStringCommands.getRange(byte[], long, long)public String getSet(String key, String value)
StringRedisConnectionvalue of key and return its old value.getSet in interface StringRedisConnectionkey - must not be null.RedisStringCommands.getSet(byte[], byte[])public Long hDel(String key, String... fields)
StringRedisConnectionfields.hDel in interface StringRedisConnectionkey - must not be null.fields - must not be null.RedisHashCommands#hDel(byte[], byte[]...)public Boolean hExists(String key, String field)
StringRedisConnectionfield exists.hExists in interface StringRedisConnectionkey - must not be null.field - must not be null.RedisHashCommands.hExists(byte[], byte[])public String hGet(String key, String field)
StringRedisConnectionfield from hash at key.hGet in interface StringRedisConnectionkey - must not be null.field - must not be null.RedisHashCommands.hGet(byte[], byte[])public Map<String,String> hGetAll(String key)
StringRedisConnectionkey.hGetAll in interface StringRedisConnectionkey - must not be null.RedisHashCommands.hGetAll(byte[])public Long hIncrBy(String key, String field, long delta)
StringRedisConnectionvalue of a hash field by the given delta.hIncrBy in interface StringRedisConnectionkey - must not be null.field - must not be null.RedisHashCommands.hIncrBy(byte[], byte[], long)public Double hIncrBy(String key, String field, double delta)
StringRedisConnectionvalue of a hash field by the given delta.hIncrBy in interface StringRedisConnectionkey - must not be null.RedisHashCommands.hIncrBy(byte[], byte[], double)@Nullable public byte[] hRandField(byte[] key)
RedisHashCommandskey.hRandField in interface RedisHashCommandskey - must not be null.@Nullable public Map.Entry<byte[],byte[]> hRandFieldWithValues(byte[] key)
RedisHashCommandskey.hRandFieldWithValues in interface RedisHashCommandskey - must not be null.@Nullable public List<byte[]> hRandField(byte[] key, long count)
RedisHashCommandskey. 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.hRandField in interface RedisHashCommandskey - must not be null.count - number of fields to return.@Nullable public List<Map.Entry<byte[],byte[]>> hRandFieldWithValues(byte[] key, long count)
RedisHashCommandskey. 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.hRandFieldWithValues in interface RedisHashCommandskey - must not be null.count - number of fields to return.@Nullable public String hRandField(String key)
StringRedisConnectionkey.hRandField in interface StringRedisConnectionkey - must not be null.@Nullable public Map.Entry<String,String> hRandFieldWithValues(String key)
StringRedisConnectionkey.hRandFieldWithValues in interface StringRedisConnectionkey - must not be null.@Nullable public List<String> hRandField(String key, long count)
StringRedisConnectionkey. 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.hRandField in interface StringRedisConnectionkey - must not be null.count - number of fields to return.@Nullable public List<Map.Entry<String,String>> hRandFieldWithValues(String key, long count)
StringRedisConnectionkey. 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.hRandFieldWithValues in interface StringRedisConnectionkey - must not be null.count - number of fields to return.public Set<String> hKeys(String key)
StringRedisConnectionkey.hKeys in interface StringRedisConnectionkey - must not be null.RedisHashCommands.hKeys(byte[])public Long hLen(String key)
StringRedisConnectionkey.hLen in interface StringRedisConnectionkey - must not be null.RedisHashCommands.hLen(byte[])public List<String> hMGet(String key, String... fields)
StringRedisConnectionfields from hash at key.hMGet in interface StringRedisConnectionkey - must not be null.fields - must not be null.RedisHashCommands#hMGet(byte[], byte[]...)public void hMSet(String key, Map<String,String> hashes)
StringRedisConnectionhasheshMSet in interface StringRedisConnectionkey - must not be null.hashes - must not be null.RedisHashCommands#hMGet(byte[], byte[]...)public Boolean hSet(String key, String field, String value)
StringRedisConnectionvalue of a hash field.hSet in interface StringRedisConnectionkey - must not be null.field - must not be null.RedisHashCommands.hSet(byte[], byte[], byte[])public Boolean hSetNX(String key, String field, String value)
StringRedisConnectionvalue of a hash field only if field does not exist.hSetNX in interface StringRedisConnectionkey - must not be null.field - must not be null.RedisHashCommands.hSetNX(byte[], byte[], byte[])public List<String> hVals(String key)
StringRedisConnectionfield.hVals in interface StringRedisConnectionkey - must not be null.RedisHashCommands.hVals(byte[])public Long incr(String key)
StringRedisConnectionkey by 1.incr in interface StringRedisConnectionkey - must not be null.RedisStringCommands.incr(byte[])public Long incrBy(String key, long value)
StringRedisConnectionkey by delta.incrBy in interface StringRedisConnectionkey - must not be null.RedisStringCommands.incrBy(byte[], long)public Double incrBy(String key, double value)
StringRedisConnectionkey by delta.incrBy in interface StringRedisConnectionkey - must not be null.RedisStringCommands.incrBy(byte[], double)public Collection<String> keys(String pattern)
StringRedisConnectionpattern.keys in interface StringRedisConnectionpattern - must not be null.RedisKeyCommands.keys(byte[])public String lIndex(String key, long index)
StringRedisConnectionindex form list at key.lIndex in interface StringRedisConnectionkey - must not be null.RedisListCommands.lIndex(byte[], long)public Long lInsert(String key, RedisListCommands.Position where, String pivot, String value)
StringRedisConnectionvalue Position#BEFORE or Position#AFTER existing pivot for key.lInsert in interface StringRedisConnectionkey - must not be null.where - must not be null.RedisListCommands.lIndex(byte[], long)public Long lLen(String key)
StringRedisConnectionkey.lLen in interface StringRedisConnectionkey - must not be null.RedisListCommands.lLen(byte[])public String lPop(String key)
StringRedisConnectionkey.lPop in interface StringRedisConnectionkey - must not be null.RedisListCommands.lPop(byte[])public List<String> lPop(String key, long count)
StringRedisConnectionkey.lPop in interface StringRedisConnectionkey - must not be null.RedisListCommands.lPop(byte[], long)public List<Long> lPos(String key, String element, @Nullable Integer rank, @Nullable Integer count)
StringRedisConnectionlPos in interface StringRedisConnectionkey - 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.public Long lPush(String key, String... values)
StringRedisConnectionvalues to key.lPush in interface StringRedisConnectionkey - must not be null.RedisListCommands#lPush(byte[], byte[]...)public Long lPushX(String key, String value)
StringRedisConnectionvalues to key only if the list exists.lPushX in interface StringRedisConnectionkey - must not be null.RedisListCommands.lPushX(byte[], byte[])public List<String> lRange(String key, long start, long end)
StringRedisConnectionstart and end from list at key.lRange in interface StringRedisConnectionkey - must not be null.RedisListCommands.lRange(byte[], long, long)public Long lRem(String key, long count, String value)
StringRedisConnectioncount occurrences of value from the list stored at key.lRem in interface StringRedisConnectionkey - must not be null.RedisListCommands.lRem(byte[], long, byte[])public void lSet(String key, long index, String value)
StringRedisConnectionvalue list element at index.lSet in interface StringRedisConnectionkey - must not be null.RedisListCommands.lSet(byte[], long, byte[])public void lTrim(String key, long start, long end)
StringRedisConnectionkey to elements between start and end.lTrim in interface StringRedisConnectionkey - must not be null.RedisListCommands.lTrim(byte[], long, long)public List<String> mGet(String... keys)
StringRedisConnectionkeys. Values are in the order of the requested keys.mGet in interface StringRedisConnectionkeys - must not be null.RedisStringCommands#mGet(byte[]...)public Boolean mSetNXString(Map<String,String> tuple)
StringRedisConnectiontuple only if the provided key does
not exist.mSetNXString in interface StringRedisConnectiontuple - must not be null.RedisStringCommands.mSetNX(Map)public Boolean mSetString(Map<String,String> tuple)
StringRedisConnectiontuple.mSetString in interface StringRedisConnectiontuple - must not be null.RedisStringCommands.mSet(Map)public Boolean persist(String key)
StringRedisConnectionkey.persist in interface StringRedisConnectionkey - must not be null.RedisKeyCommands.persist(byte[])public Boolean move(String key, int dbIndex)
StringRedisConnectionkey to database with index.move in interface StringRedisConnectionkey - must not be null.RedisKeyCommands.move(byte[], int)public void pSubscribe(MessageListener listener, String... patterns)
StringRedisConnectionNote that this operation is blocking and the current thread starts waiting for new messages immediately.
pSubscribe in interface StringRedisConnectionlistener - message listener, must not be null.patterns - channel name patterns, must not be null.RedisPubSubCommands#pSubscribe(MessageListener, byte[]...)public Long publish(String channel, String message)
StringRedisConnectionpublish in interface StringRedisConnectionchannel - the channel to publish to, must not be null.message - message to publishRedisPubSubCommands.publish(byte[], byte[])public void rename(String oldKey, String newKey)
StringRedisConnectionoldKey to newKey.rename in interface StringRedisConnectionoldKey - must not be null.newKey - must not be null.RedisKeyCommands.rename(byte[], byte[])public Boolean renameNX(String oldKey, String newKey)
StringRedisConnectionoldKey to newKey only if newKey does not exist.renameNX in interface StringRedisConnectionnewKey - must not be null.RedisKeyCommands.renameNX(byte[], byte[])public String rPop(String key)
StringRedisConnectionkey.rPop in interface StringRedisConnectionkey - must not be null.RedisListCommands.rPop(byte[])public List<String> rPop(String key, long count)
StringRedisConnectionkey.rPop in interface StringRedisConnectionkey - must not be null.RedisListCommands.rPop(byte[], long)public String rPopLPush(String srcKey, String dstKey)
StringRedisConnectionsrcKey, append it to dstKey and return its value.rPopLPush in interface StringRedisConnectionsrcKey - must not be null.dstKey - must not be null.RedisListCommands.rPopLPush(byte[], byte[])public Long rPush(String key, String... values)
StringRedisConnectionvalues to key.rPush in interface StringRedisConnectionkey - must not be null.RedisListCommands#rPush(byte[], byte[]...)public Long rPushX(String key, String value)
StringRedisConnectionvalues to key only if the list exists.rPushX in interface StringRedisConnectionkey - must not be null.RedisListCommands.rPushX(byte[], byte[])public Long sAdd(String key, String... values)
StringRedisConnectionvalues to set at key.sAdd in interface StringRedisConnectionkey - must not be null.RedisSetCommands#sAdd(byte[], byte[]...)public Long sCard(String key)
StringRedisConnectionkey.sCard in interface StringRedisConnectionkey - must not be null.RedisSetCommands.sCard(byte[])public Set<String> sDiff(String... keys)
StringRedisConnectionkeys.sDiff in interface StringRedisConnectionkeys - must not be null.RedisSetCommands#sDiff(byte[]...)public Long sDiffStore(String destKey, String... keys)
StringRedisConnectionkeys and store result in destKey.sDiffStore in interface StringRedisConnectiondestKey - must not be null.keys - must not be null.RedisSetCommands#sDiffStore(byte[], byte[]...)public Boolean set(String key, String value)
StringRedisConnectionvalue for key.set in interface StringRedisConnectionkey - must not be null.value - must not be null.RedisStringCommands.set(byte[], byte[])public Boolean set(String key, String value, Expiration expiration, RedisStringCommands.SetOption option)
StringRedisConnectionvalue for key applying timeouts from expiration if set and inserting/updating values
depending on option.set in interface StringRedisConnectionkey - 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)public Boolean setBit(String key, long offset, boolean value)
StringRedisConnectionoffset in value stored at key.setBit in interface StringRedisConnectionkey - must not be null.offset.RedisStringCommands.setBit(byte[], long, boolean)public Boolean setEx(String key, long seconds, String value)
StringRedisConnectionvalue and expiration in seconds for key.setEx in interface StringRedisConnectionkey - must not be null.value - must not be null.RedisStringCommands.setEx(byte[], long, byte[])public Boolean pSetEx(String key, long seconds, String value)
StringRedisConnectionvalue and expiration in milliseconds for key.pSetEx in interface StringRedisConnectionkey - must not be null.value - must not be null.RedisStringCommands.pSetEx(byte[], long, byte[])public Boolean setNX(String key, String value)
StringRedisConnectionvalue for key, only if key does not exist.setNX in interface StringRedisConnectionkey - must not be null.value - must not be null.RedisStringCommands.setNX(byte[], byte[])public void setRange(String key, String value, long start)
StringRedisConnectionkey starting at the specified offset with given value.setRange in interface StringRedisConnectionkey - must not be null.RedisStringCommands.setRange(byte[], byte[], long)public Set<String> sInter(String... keys)
StringRedisConnectionkeys.sInter in interface StringRedisConnectionkeys - must not be null.RedisSetCommands#sInter(byte[]...)public Long sInterStore(String destKey, String... keys)
StringRedisConnectionkeys and store result in destKey.sInterStore in interface StringRedisConnectiondestKey - must not be null.keys - must not be null.RedisSetCommands#sInterStore(byte[], byte[]...)public Boolean sIsMember(String key, String value)
StringRedisConnectionkey contains value.sIsMember in interface StringRedisConnectionkey - must not be null.RedisSetCommands.sIsMember(byte[], byte[])public List<Boolean> sMIsMember(String key, String... values)
StringRedisConnectionkey contains one or more values.sMIsMember in interface StringRedisConnectionkey - must not be null.values - must not be null.RedisSetCommands#sMIsMember(byte[], byte[]...)public Set<String> sMembers(String key)
StringRedisConnectionkey.sMembers in interface StringRedisConnectionkey - must not be null.RedisSetCommands.sMembers(byte[])public Boolean sMove(String srcKey, String destKey, String value)
StringRedisConnectionvalue from srcKey to destKeysMove in interface StringRedisConnectionsrcKey - must not be null.destKey - must not be null.RedisSetCommands.sMove(byte[], byte[], byte[])public Long sort(String key, SortParameters params, String storeKey)
StringRedisConnectionkey and store result in storeKey.sort in interface StringRedisConnectionkey - must not be null.params - must not be null.storeKey - must not be null.public List<String> sort(String key, SortParameters params)
StringRedisConnectionkey.sort in interface StringRedisConnectionkey - must not be null.params - must not be null.public ValueEncoding encodingOf(String key)
StringRedisConnectionkey.encodingOf in interface StringRedisConnectionkey - must not be null.public Duration idletime(String key)
StringRedisConnectionDuration since the object stored at the given key is idle.idletime in interface StringRedisConnectionkey - must not be null.public Long refcount(String key)
StringRedisConnectionkey.refcount in interface StringRedisConnectionkey - must not be null.public String sPop(String key)
StringRedisConnectionkey.sPop in interface StringRedisConnectionkey - must not be null.RedisSetCommands.sPop(byte[])public List<String> sPop(String key, long count)
StringRedisConnectioncount random members from set at key.sPop in interface StringRedisConnectionkey - must not be null.count - the number of random members to return.List if key does not exist.RedisSetCommands.sPop(byte[], long)public String sRandMember(String key)
StringRedisConnectionkey.sRandMember in interface StringRedisConnectionkey - must not be null.RedisSetCommands.sRandMember(byte[])public List<String> sRandMember(String key, long count)
StringRedisConnectioncount random elements from set at key.sRandMember in interface StringRedisConnectionkey - must not be null.RedisSetCommands#sRem(byte[], byte[]...)public Long sRem(String key, String... values)
StringRedisConnectionvalues from set at key and return the number of removed elements.sRem in interface StringRedisConnectionkey - must not be null.RedisSetCommands#sRem(byte[], byte[]...)public Long strLen(String key)
StringRedisConnectionkey.strLen in interface StringRedisConnectionkey - must not be null.RedisStringCommands.strLen(byte[])public Long bitCount(String key)
StringRedisConnectionkey.bitCount in interface StringRedisConnectionkey - must not be null.RedisStringCommands.bitCount(byte[])public Long bitCount(String key, long start, long end)
StringRedisConnectionkey between start and
end.bitCount in interface StringRedisConnectionkey - must not be null.RedisStringCommands.bitCount(byte[], long, long)public Long bitOp(RedisStringCommands.BitOperation op, String destination, String... keys)
StringRedisConnectionbitOp in interface StringRedisConnectionop - must not be null.destination - must not be null.keys - must not be null.RedisStringCommands#bitOp(BitOperation, byte[], byte[]...)@Nullable public Long bitPos(String key, boolean bit, Range<Long> range)
StringRedisConnectionbit 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.bitPos in interface StringRedisConnectionkey - 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.public void subscribe(MessageListener listener, String... channels)
StringRedisConnectionNote that this operation is blocking and the current thread starts waiting for new messages immediately.
subscribe in interface StringRedisConnectionlistener - message listener, must not be null.channels - channel names, must not be null.RedisPubSubCommands#subscribe(MessageListener, byte[]...)public Set<String> sUnion(String... keys)
StringRedisConnectionkeys.sUnion in interface StringRedisConnectionkeys - must not be null.RedisSetCommands#sUnion(byte[]...)public Long sUnionStore(String destKey, String... keys)
StringRedisConnectionkeys and store result in destKey.sUnionStore in interface StringRedisConnectiondestKey - must not be null.keys - must not be null.RedisSetCommands#sUnionStore(byte[], byte[]...)public Long ttl(String key)
StringRedisConnectionkey in seconds.ttl in interface StringRedisConnectionkey - must not be null.RedisKeyCommands.ttl(byte[])public Long ttl(String key, TimeUnit timeUnit)
StringRedisConnectionkey in and convert it to the given TimeUnit.ttl in interface StringRedisConnectionkey - must not be null.timeUnit - must not be null.RedisKeyCommands.ttl(byte[], TimeUnit)public DataType type(String key)
StringRedisConnectionkey.type in interface StringRedisConnectionkey - must not be null.RedisKeyCommands.type(byte[])@Nullable public Long touch(String... keys)
StringRedisConnectionkey(s).touch in interface StringRedisConnectionkeys - must not be null.public Boolean zAdd(String key, double score, String value)
StringRedisConnectionvalue to a sorted set at key, or update its score if it already exists.zAdd in interface StringRedisConnectionkey - must not be null.score - the score.value - the value.RedisZSetCommands.zAdd(byte[], double, byte[])public Boolean zAdd(String key, double score, String value, RedisZSetCommands.ZAddArgs args)
StringRedisConnectionvalue to a sorted set at key, or update its score depending on the given
args.zAdd in interface StringRedisConnectionkey - 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)public Long zAdd(String key, Set<StringRedisConnection.StringTuple> tuples)
StringRedisConnectiontuples to a sorted set at key, or update its score if it already exists.zAdd in interface StringRedisConnectionkey - must not be null.tuples - the tuples.RedisZSetCommands.zAdd(byte[], Set)public Long zAdd(String key, Set<StringRedisConnection.StringTuple> tuples, RedisZSetCommands.ZAddArgs args)
StringRedisConnectiontuples to a sorted set at key, or update its score depending on the given
args.zAdd in interface StringRedisConnectionkey - must not be null.tuples - must not be null.args - must not be null use ZAddArgs#empty() instead.RedisZSetCommands.zAdd(byte[], Set, ZAddArgs)public Long zCard(String key)
StringRedisConnectionkey.zCard in interface StringRedisConnectionkey - must not be null.RedisZSetCommands.zCard(byte[])public Long zCount(String key, double min, double max)
StringRedisConnectionmin and max.zCount in interface StringRedisConnectionkey - must not be null.RedisZSetCommands.zCount(byte[], double, double)public Long zLexCount(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandsRange#min and Range#max applying
lexicographical ordering.zLexCount in interface RedisZSetCommandskey - must not be null.range - must not be null.@Nullable public RedisZSetCommands.Tuple zPopMin(byte[] key)
RedisZSetCommandskey.zPopMin in interface RedisZSetCommandskey - must not be null.@Nullable public StringRedisConnection.StringTuple zPopMin(String key)
StringRedisConnectionkey.zPopMin in interface StringRedisConnectionkey - must not be null.@Nullable public Set<RedisZSetCommands.Tuple> zPopMin(byte[] key, long count)
RedisZSetCommandscount values with their score having the lowest score from sorted set at key.zPopMin in interface RedisZSetCommandskey - must not be null.count - number of elements to pop.@Nullable public Set<StringRedisConnection.StringTuple> zPopMin(String key, long count)
StringRedisConnectioncount values with their score having the lowest score from sorted set at key.zPopMin in interface StringRedisConnectionkey - must not be null.count - number of elements to pop.@Nullable public RedisZSetCommands.Tuple bZPopMin(byte[] key, long timeout, TimeUnit unit)
RedisZSetCommandskey. timeout reached.bZPopMin in interface RedisZSetCommandskey - must not be null.unit - must not be null.@Nullable public StringRedisConnection.StringTuple bZPopMin(String key, long timeout, TimeUnit unit)
StringRedisConnectionkey. Blocks
connection until element available or timeout reached.bZPopMin in interface StringRedisConnectionkey - must not be null.unit - must not be null.@Nullable public RedisZSetCommands.Tuple zPopMax(byte[] key)
RedisZSetCommandskey.zPopMax in interface RedisZSetCommandskey - must not be null.@Nullable public StringRedisConnection.StringTuple zPopMax(String key)
StringRedisConnectionkey.zPopMax in interface StringRedisConnectionkey - must not be null.@Nullable public Set<RedisZSetCommands.Tuple> zPopMax(byte[] key, long count)
RedisZSetCommandscount values with their score having the highest score from sorted set at key.zPopMax in interface RedisZSetCommandskey - must not be null.count - number of elements to pop.@Nullable public Set<StringRedisConnection.StringTuple> zPopMax(String key, long count)
StringRedisConnectioncount values with their score having the highest score from sorted set at key.zPopMax in interface StringRedisConnectionkey - must not be null.count - number of elements to pop.@Nullable public RedisZSetCommands.Tuple bZPopMax(byte[] key, long timeout, TimeUnit unit)
RedisZSetCommandskey. timeout reached.bZPopMax in interface RedisZSetCommandskey - must not be null.unit - must not be null.@Nullable public StringRedisConnection.StringTuple bZPopMax(String key, long timeout, TimeUnit unit)
StringRedisConnectionkey. Blocks
connection until element available or timeout reached.bZPopMax in interface StringRedisConnectionkey - must not be null.unit - must not be null.public Double zIncrBy(String key, double increment, String value)
StringRedisConnectionvalue in sorted set by increment.zIncrBy in interface StringRedisConnectionkey - must not be null.value - the value.RedisZSetCommands.zIncrBy(byte[], double, byte[])public Long zInterStore(String destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, String... sets)
StringRedisConnectionsets and store result in destination key.zInterStore in interface StringRedisConnectiondestKey - must not be null.aggregate - must not be null.sets - must not be null.RedisZSetCommands#zInterStore(byte[], Aggregate, int[], byte[]...)public Long zInterStore(String destKey, String... sets)
StringRedisConnectionsets and store result in destination key.zInterStore in interface StringRedisConnectiondestKey - must not be null.sets - must not be null.RedisZSetCommands#zInterStore(byte[], byte[]...)public byte[] zRandMember(byte[] key)
RedisZSetCommandskey.zRandMember in interface RedisZSetCommandskey - must not be null.public List<byte[]> zRandMember(byte[] key, long count)
RedisZSetCommandscount random elements from sorted set at key.zRandMember in interface RedisZSetCommandskey - 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.public RedisZSetCommands.Tuple zRandMemberWithScore(byte[] key)
RedisZSetCommandskey.zRandMemberWithScore in interface RedisZSetCommandskey - must not be null.public List<RedisZSetCommands.Tuple> zRandMemberWithScore(byte[] key, long count)
RedisZSetCommandscount random elements from sorted set at key.zRandMemberWithScore in interface RedisZSetCommandskey - 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.public String zRandMember(String key)
StringRedisConnectionkey.zRandMember in interface StringRedisConnectionkey - must not be null.public List<String> zRandMember(String key, long count)
StringRedisConnectioncount random elements from sorted set at key.zRandMember in interface StringRedisConnectionkey - 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.public StringRedisConnection.StringTuple zRandMemberWithScore(String key)
StringRedisConnectionkey.zRandMemberWithScore in interface StringRedisConnectionkey - must not be null.public List<StringRedisConnection.StringTuple> zRandMemberWithScores(String key, long count)
StringRedisConnectioncount random elements from sorted set at key.zRandMemberWithScores in interface StringRedisConnectionkey - 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.public Set<String> zRange(String key, long start, long end)
StringRedisConnectionstart and end from sorted set.zRange in interface StringRedisConnectionkey - must not be null.RedisZSetCommands.zRange(byte[], long, long)public Set<String> zRangeByScore(String key, double min, double max, long offset, long count)
StringRedisConnectionstart to end where score is between min and max from
sorted set.zRangeByScore in interface StringRedisConnectionkey - must not be null.RedisZSetCommands.zRangeByScore(byte[], double, double, long, long)public Set<String> zRangeByScore(String key, double min, double max)
StringRedisConnectionmin and max from sorted set.zRangeByScore in interface StringRedisConnectionkey - must not be null.RedisZSetCommands.zRangeByScore(byte[], double, double)public Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key, double min, double max, long offset, long count)
StringRedisConnectionTuples in range from start to end where score is between min and
max from sorted set.zRangeByScoreWithScores in interface StringRedisConnectionRedisZSetCommands.zRangeByScoreWithScores(byte[], double, double, long, long)public Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key, double min, double max)
StringRedisConnectionTuples where score is between min and max from sorted set.zRangeByScoreWithScores in interface StringRedisConnectionkey - must not be null.RedisZSetCommands.zRangeByScoreWithScores(byte[], double, double)public Set<StringRedisConnection.StringTuple> zRangeWithScores(String key, long start, long end)
StringRedisConnectionTuples between start and end from sorted set.zRangeWithScores in interface StringRedisConnectionkey - must not be null.RedisZSetCommands.zRangeWithScores(byte[], long, long)public Long zRank(String key, String value)
StringRedisConnectionvalue in a sorted set.zRank in interface StringRedisConnectionkey - must not be null.value - the value.RedisZSetCommands.zRank(byte[], byte[])public Long zRem(String key, String... values)
StringRedisConnectionvalues from sorted set. Return number of removed elements.zRem in interface StringRedisConnectionkey - must not be null.values - must not be null.RedisZSetCommands#zRem(byte[], byte[]...)public Long zRemRange(String key, long start, long end)
StringRedisConnectionstart and end from sorted set with key.zRemRange in interface StringRedisConnectionkey - must not be null.RedisZSetCommands.zRemRange(byte[], long, long)public Long zRemRangeByLex(String key, RedisZSetCommands.Range range)
StringRedisConnectionRange.zRemRangeByLex in interface StringRedisConnectionkey - must not be null.range - must not be null.public Long zRemRangeByScore(String key, double min, double max)
StringRedisConnectionmin and max from sorted set with key.zRemRangeByScore in interface StringRedisConnectionkey - must not be null.RedisZSetCommands.zRemRangeByScore(byte[], double, double)public Set<String> zRevRange(String key, long start, long end)
StringRedisConnectionstart to end from sorted set ordered from high to low.zRevRange in interface StringRedisConnectionkey - must not be null.RedisZSetCommands.zRevRange(byte[], long, long)public Set<StringRedisConnection.StringTuple> zRevRangeWithScores(String key, long start, long end)
StringRedisConnectionTuples in range from start to end from sorted set ordered from high to low.zRevRangeWithScores in interface StringRedisConnectionkey - must not be null.RedisZSetCommands.zRevRangeWithScores(byte[], long, long)public Set<String> zRevRangeByScore(String key, double min, double max)
StringRedisConnectionmin and max from sorted set ordered from high to low.zRevRangeByScore in interface StringRedisConnectionkey - must not be null.RedisZSetCommands.zRevRangeByScore(byte[], double, double)public Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key, double min, double max)
StringRedisConnectionTuple where score is between min and max from sorted set ordered from high to
low.zRevRangeByScoreWithScores in interface StringRedisConnectionkey - must not be null.RedisZSetCommands.zRevRangeByScoreWithScores(byte[], double, double)public Set<String> zRevRangeByScore(String key, double min, double max, long offset, long count)
StringRedisConnectionstart to end where score is between min and max from
sorted set ordered high -> low.zRevRangeByScore in interface StringRedisConnectionkey - must not be null.RedisZSetCommands.zRevRangeByScore(byte[], double, double, long, long)public Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key, double min, double max, long offset, long count)
StringRedisConnectionTuple in range from start to end where score is between min and
max from sorted set ordered high -> low.zRevRangeByScoreWithScores in interface StringRedisConnectionkey - must not be null.RedisZSetCommands.zRevRangeByScoreWithScores(byte[], double, double, long, long)public Long zRevRank(String key, String value)
StringRedisConnectionvalue in a sorted set when scored high to low.zRevRank in interface StringRedisConnectionkey - must not be null.value - the value.RedisZSetCommands.zRevRank(byte[], byte[])public Double zScore(String key, String value)
StringRedisConnectionvalue from sorted set with key key.zScore in interface StringRedisConnectionkey - must not be null.value - the value.RedisZSetCommands.zScore(byte[], byte[])public List<Double> zMScore(String key, String... values)
StringRedisConnectionvalues from sorted set with key key.zMScore in interface StringRedisConnectionkey - must not be null.values - the values.RedisZSetCommands.zMScore(byte[], byte[][])public Long zUnionStore(String destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, String... sets)
StringRedisConnectionsets and store result in destination key.zUnionStore in interface StringRedisConnectiondestKey - must not be null.aggregate - must not be null.sets - must not be null.RedisZSetCommands#zUnionStore(byte[], Aggregate, int[], byte[]...)public Long zUnionStore(String destKey, String... sets)
StringRedisConnectionsets and store result in destination key.zUnionStore in interface StringRedisConnectiondestKey - must not be null.sets - must not be null.RedisZSetCommands#zUnionStore(byte[], byte[]...)public Long geoAdd(byte[] key, Point point, byte[] member)
RedisGeoCommandsPoint with given member name to key.geoAdd in interface RedisGeoCommandskey - must not be null.point - must not be null.member - must not be null.public Long geoAdd(byte[] key, RedisGeoCommands.GeoLocation<byte[]> location)
RedisGeoCommandsRedisGeoCommands.GeoLocation to key.geoAdd in interface RedisGeoCommandskey - must not be null.location - must not be null.public Long geoAdd(String key, Point point, String member)
StringRedisConnectionPoint with given member name to key.geoAdd in interface StringRedisConnectionkey - must not be null.point - must not be null.member - must not be null.RedisGeoCommands.geoAdd(byte[], Point, byte[])public Long geoAdd(String key, RedisGeoCommands.GeoLocation<String> location)
StringRedisConnectionGeoLocation to key.geoAdd in interface StringRedisConnectionkey - must not be null.location - must not be null.RedisGeoCommands.geoAdd(byte[], GeoLocation)public Long geoAdd(byte[] key, Map<byte[],Point> memberCoordinateMap)
RedisGeoCommandsgeoAdd in interface RedisGeoCommandskey - must not be null.memberCoordinateMap - must not be null.public Long geoAdd(byte[] key, Iterable<RedisGeoCommands.GeoLocation<byte[]>> locations)
RedisGeoCommandsRedisGeoCommands.GeoLocations to keygeoAdd in interface RedisGeoCommandskey - must not be null.locations - must not be null.public Long geoAdd(String key, Map<String,Point> memberCoordinateMap)
StringRedisConnectiongeoAdd in interface StringRedisConnectionkey - must not be null.memberCoordinateMap - must not be null.RedisGeoCommands.geoAdd(byte[], Map)public Long geoAdd(String key, Iterable<RedisGeoCommands.GeoLocation<String>> locations)
StringRedisConnectionGeoLocations to keygeoAdd in interface StringRedisConnectionkey - must not be null.locations - must not be null.RedisGeoCommands.geoAdd(byte[], Iterable)public Distance geoDist(byte[] key, byte[] member1, byte[] member2)
RedisGeoCommandsDistance between member1 and member2.geoDist in interface RedisGeoCommandskey - must not be null.member1 - must not be null.member2 - must not be null.public Distance geoDist(String key, String member1, String member2)
StringRedisConnectionDistance between member1 and member2.geoDist in interface StringRedisConnectionkey - must not be null.member1 - must not be null.member2 - must not be null.RedisGeoCommands.geoDist(byte[], byte[], byte[])public Distance geoDist(byte[] key, byte[] member1, byte[] member2, Metric metric)
RedisGeoCommandsgeoDist in interface RedisGeoCommandskey - must not be null.member1 - must not be null.member2 - must not be null.metric - must not be null.public Distance geoDist(String key, String member1, String member2, Metric metric)
StringRedisConnectiongeoDist in interface StringRedisConnectionkey - 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)public List<String> geoHash(byte[] key, byte[]... members)
RedisGeoCommandsgeoHash in interface RedisGeoCommandskey - must not be null.members - must not be null.public List<String> geoHash(String key, String... members)
StringRedisConnectiongeoHash in interface StringRedisConnectionkey - must not be null.members - must not be null.RedisGeoCommands#geoHash(byte[], byte[]...)public List<Point> geoPos(byte[] key, byte[]... members)
RedisGeoCommandsPoint representation of positions for one or more members.geoPos in interface RedisGeoCommandskey - must not be null.members - must not be null.List when key of members do not exist. null when used in pipeline / transaction.public List<Point> geoPos(String key, String... members)
StringRedisConnectionPoint representation of positions for one or more members.geoPos in interface StringRedisConnectionkey - must not be null.members - must not be null.RedisGeoCommands#geoPos(byte[], byte[]...)public GeoResults<RedisGeoCommands.GeoLocation<String>> geoRadius(String key, Circle within)
StringRedisConnectionCircle.geoRadius in interface StringRedisConnectionkey - must not be null.within - must not be null.RedisGeoCommands.geoRadius(byte[], Circle)public GeoResults<RedisGeoCommands.GeoLocation<String>> geoRadius(String key, Circle within, RedisGeoCommands.GeoRadiusCommandArgs args)
StringRedisConnectionCircle applying GeoRadiusCommandArgs.geoRadius in interface StringRedisConnectionkey - must not be null.within - must not be null.args - must not be null.RedisGeoCommands.geoRadius(byte[], Circle, GeoRadiusCommandArgs)public GeoResults<RedisGeoCommands.GeoLocation<String>> geoRadiusByMember(String key, String member, double radius)
StringRedisConnectiongeoRadiusByMember in interface StringRedisConnectionkey - must not be null.member - must not be null.RedisGeoCommands.geoRadiusByMember(byte[], byte[], double)public GeoResults<RedisGeoCommands.GeoLocation<String>> geoRadiusByMember(String key, String member, Distance radius)
StringRedisConnectionDistance.geoRadiusByMember in interface StringRedisConnectionkey - must not be null.member - must not be null.radius - must not be null.RedisGeoCommands.geoRadiusByMember(byte[], byte[], Distance)public GeoResults<RedisGeoCommands.GeoLocation<String>> geoRadiusByMember(String key, String member, Distance radius, RedisGeoCommands.GeoRadiusCommandArgs args)
StringRedisConnectionDistance and GeoRadiusCommandArgs.geoRadiusByMember in interface StringRedisConnectionkey - 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)public GeoResults<RedisGeoCommands.GeoLocation<byte[]>> geoRadius(byte[] key, Circle within)
RedisGeoCommandsCircle.geoRadius in interface RedisGeoCommandskey - must not be null.within - must not be null.public GeoResults<RedisGeoCommands.GeoLocation<byte[]>> geoRadius(byte[] key, Circle within, RedisGeoCommands.GeoRadiusCommandArgs args)
RedisGeoCommandsCircle applying RedisGeoCommands.GeoRadiusCommandArgs.geoRadius in interface RedisGeoCommandskey - must not be null.within - must not be null.args - must not be null.public GeoResults<RedisGeoCommands.GeoLocation<byte[]>> geoRadiusByMember(byte[] key, byte[] member, double radius)
RedisGeoCommandsgeoRadiusByMember in interface RedisGeoCommandskey - must not be null.member - must not be null.public GeoResults<RedisGeoCommands.GeoLocation<byte[]>> geoRadiusByMember(byte[] key, byte[] member, Distance radius)
RedisGeoCommandsDistance.geoRadiusByMember in interface RedisGeoCommandskey - must not be null.member - must not be null.radius - must not be null.public GeoResults<RedisGeoCommands.GeoLocation<byte[]>> geoRadiusByMember(byte[] key, byte[] member, Distance radius, RedisGeoCommands.GeoRadiusCommandArgs args)
RedisGeoCommandsDistance
and RedisGeoCommands.GeoRadiusCommandArgs.geoRadiusByMember in interface RedisGeoCommandskey - must not be null.member - must not be null.radius - must not be null.args - must not be null.public Long geoRemove(byte[] key, byte[]... members)
RedisGeoCommandsgeoRemove in interface RedisGeoCommandskey - must not be null.members - must not be null.public Long geoRemove(String key, String... members)
StringRedisConnectiongeoRemove in interface StringRedisConnectionkey - must not be null.members - must not be null.RedisGeoCommands#geoRemove(byte[], byte[]...)public GeoResults<RedisGeoCommands.GeoLocation<byte[]>> geoSearch(byte[] key, GeoReference<byte[]> reference, GeoShape predicate, RedisGeoCommands.GeoSearchCommandArgs args)
RedisGeoCommandsshape. The query's center point is provided by GeoReference.geoSearch in interface RedisGeoCommandskey - must not be null.reference - must not be null.predicate - must not be null.args - must not be null.public Long geoSearchStore(byte[] destKey, byte[] key, GeoReference<byte[]> reference, GeoShape predicate, RedisGeoCommands.GeoSearchStoreCommandArgs args)
RedisGeoCommandsshape
and store the result at destKey. The query's center point is provided by GeoReference.geoSearchStore in interface RedisGeoCommandskey - must not be null.reference - must not be null.predicate - must not be null.args - must not be null.public GeoResults<RedisGeoCommands.GeoLocation<String>> geoSearch(String key, GeoReference<String> reference, GeoShape predicate, RedisGeoCommands.GeoSearchCommandArgs args)
StringRedisConnectionshape. The query's center point is provided by
GeoReference.geoSearch in interface StringRedisConnectionkey - must not be null.reference - must not be null.predicate - must not be null.args - must not be null.public Long geoSearchStore(String destKey, String key, GeoReference<String> reference, GeoShape predicate, RedisGeoCommands.GeoSearchStoreCommandArgs args)
StringRedisConnectionshape
and store the result at destKey. The query's center point is provided by
GeoReference.geoSearchStore in interface StringRedisConnectionkey - must not be null.reference - must not be null.predicate - must not be null.args - must not be null.public List<Object> closePipeline()
RedisConnectionclosePipeline in interface RedisConnectionpublic boolean isPipelined()
RedisConnectionisPipelined in interface RedisConnectionRedisConnection.openPipeline(),
RedisConnection.isQueueing()public void openPipeline()
RedisConnectionRedisConnection.closePipeline(). Calling this method when the connection is already pipelined has no effect.
Pipelining is used for issuing commands without requesting the response right away but rather at the end of the
batch. While somewhat similar to MULTI, pipelining does not guarantee atomicity - it only tries to improve
performance when issuing a lot of commands (such as in batching scenarios).
Note:
Consider doing some performance testing before using this feature since in many cases the performance benefits are minimal yet the impact on usage are not.openPipeline in interface RedisConnectionRedisTxCommands.multi()public Object execute(String command)
StringRedisConnectionexecute in interface StringRedisConnectioncommand - Command to executeRedisCommands#execute(String, byte[]...)public Object execute(String command, byte[]... args)
RedisCommandsexecute in interface RedisCommandscommand - Command to execute. must not be null.args - Possible command arguments (may be empty).public Object execute(String command, String... args)
StringRedisConnectionexecute in interface StringRedisConnectioncommand - Command to executeargs - Possible command arguments (may be null)RedisCommands#execute(String, byte[]...)public Boolean pExpire(String key, long millis)
StringRedisConnectionkey in milliseconds.pExpire in interface StringRedisConnectionkey - must not be null.RedisKeyCommands.pExpire(byte[], long)public Boolean pExpireAt(String key, long unixTimeInMillis)
StringRedisConnectionkey as a UNIX timestamp in milliseconds.pExpireAt in interface StringRedisConnectionkey - must not be null.RedisKeyCommands.pExpireAt(byte[], long)public Long pTtl(String key)
StringRedisConnectionkey in milliseconds.pTtl in interface StringRedisConnectionkey - must not be null.RedisKeyCommands.pTtl(byte[])public Long pTtl(String key, TimeUnit timeUnit)
StringRedisConnectionkey in and convert it to the given TimeUnit.pTtl in interface StringRedisConnectionkey - must not be null.timeUnit - must not be null.RedisKeyCommands.pTtl(byte[], TimeUnit)public String scriptLoad(String script)
StringRedisConnection#evalSha(byte[], ReturnType, int, byte[]...).scriptLoad in interface StringRedisConnectionscript - must not be null.RedisScriptingCommands.scriptLoad(byte[])public <T> T eval(String script, ReturnType returnType, int numKeys, String... keysAndArgs)
eval in interface StringRedisConnectionscript - must not be null.returnType - must not be null.keysAndArgs - must not be null.RedisScriptingCommands#eval(byte[], ReturnType, int, byte[]...)public <T> T evalSha(String scriptSha1, ReturnType returnType, int numKeys, String... keysAndArgs)
evalSha in interface StringRedisConnectionscriptSha1 - must not be null.returnType - must not be null.keysAndArgs - must not be null.RedisScriptingCommands#evalSha(String, ReturnType, int, byte[]...)public Long time()
RedisServerCommandsTIME command in TimeUnit.MILLISECONDS.time in interface RedisServerCommandspublic Long time(TimeUnit timeUnit)
RedisServerCommandsTIME command.time in interface RedisServerCommandstimeUnit - target unit.TimeUnit or null when used in pipeline / transaction.public List<RedisClientInfo> getClientList()
StringRedisConnectiongetClientList in interface RedisServerCommandsgetClientList in interface StringRedisConnectionList of RedisClientInfo objects.RedisServerCommands.getClientList()public void slaveOf(String host, int port)
RedisServerCommandsslaveOf in interface RedisServerCommandshost - must not be null.public void slaveOfNoOne()
RedisServerCommandsslaveOfNoOne in interface RedisServerCommandspublic Cursor<byte[]> scan(ScanOptions options)
RedisKeyCommandsCursor to iterate over keys.scan in interface RedisKeyCommandsoptions - must not be null.public Cursor<RedisZSetCommands.Tuple> zScan(byte[] key, ScanOptions options)
RedisZSetCommandsCursor to iterate over elements in sorted set at key.zScan in interface RedisZSetCommandskey - must not be null.options - must not be null.public Cursor<byte[]> sScan(byte[] key, ScanOptions options)
RedisSetCommandsCursor to iterate over elements in set at key.sScan in interface RedisSetCommandskey - must not be null.options - must not be null.public Cursor<Map.Entry<byte[],byte[]>> hScan(byte[] key, ScanOptions options)
RedisHashCommandsCursor to iterate over entries in hash at key.hScan in interface RedisHashCommandskey - must not be null.options - must not be null.@Nullable public Long hStrLen(byte[] key, byte[] field)
RedisHashCommandsfield in the hash stored at key. If the key
or the field do not exist, 0 is returned.hStrLen in interface RedisHashCommandskey - must not be null.field - must not be null.public void setClientName(byte[] name)
RedisServerCommandssetClientName in interface RedisServerCommandspublic void setClientName(String name)
StringRedisConnectionsetClientName in interface StringRedisConnectionRedisServerCommands.setClientName(byte[])public void killClient(String host, int port)
RedisServerCommandskillClient in interface RedisServerCommandshost - of connection to close.port - of connection to closepublic String getClientName()
RedisServerCommandsgetClientName in interface RedisServerCommandspublic Cursor<Map.Entry<String,String>> hScan(String key, ScanOptions options)
StringRedisConnectionCursor to iterate over entries in hash at key.hScan in interface StringRedisConnectionkey - must not be null.options - must not be null.RedisHashCommands.hScan(byte[], ScanOptions)public Long hStrLen(String key, String field)
StringRedisConnectionfield in the hash stored at key. If the key or the
field do not exist, 0 is returned.hStrLen in interface StringRedisConnectionkey - must not be null.field - must not be null.public Cursor<String> sScan(String key, ScanOptions options)
StringRedisConnectionCursor to iterate over elements in set at key.sScan in interface StringRedisConnectionkey - must not be null.options - must not be null.RedisSetCommands.sScan(byte[], ScanOptions)public Cursor<StringRedisConnection.StringTuple> zScan(String key, ScanOptions options)
StringRedisConnectionCursor to iterate over elements in sorted set at key.zScan in interface StringRedisConnectionkey - must not be null.options - must not be null.RedisZSetCommands.zScan(byte[], ScanOptions)public RedisSentinelConnection getSentinelConnection()
getSentinelConnection in interface RedisConnectionpublic Set<String> zRangeByScore(String key, String min, String max)
StringRedisConnectionmin and max from sorted set.zRangeByScore in interface StringRedisConnectionkey - must not be null.min - must not be null.max - must not be null.RedisZSetCommands.zRangeByScore(byte[], String, String)public Set<String> zRangeByScore(String key, String min, String max, long offset, long count)
StringRedisConnectionstart to end where score is between min and max from
sorted set.zRangeByScore in interface StringRedisConnectionkey - must not be null.min - must not be null.max - must not be null.RedisZSetCommands.zRangeByScore(byte[], double, double, long, long)public Set<byte[]> zRangeByScore(byte[] key, String min, String max)
RedisZSetCommandsmin and max from sorted set.zRangeByScore in interface RedisZSetCommandskey - must not be null.public Set<byte[]> zRangeByScore(byte[] key, String min, String max, long offset, long count)
RedisZSetCommandsstart to end where score is between min and max from
sorted set.zRangeByScore in interface RedisZSetCommandskey - must not be null.min - must not be null.max - must not be null.public Long pfAdd(byte[] key, byte[]... values)
RedisHyperLogLogCommandspfAdd in interface RedisHyperLogLogCommandskey - must not be null.values - must not be null.public Long pfAdd(String key, String... values)
StringRedisConnectionpfAdd in interface StringRedisConnectionkey - must not be null.values - must not be null.RedisHyperLogLogCommands#pfAdd(byte[], byte[]...)public Long pfCount(byte[]... keys)
RedisHyperLogLogCommandspfCount in interface RedisHyperLogLogCommandskeys - must not be null.public Long pfCount(String... keys)
StringRedisConnectionpfCount in interface StringRedisConnectionkeys - must not be null.RedisHyperLogLogCommands#pfCount(byte[]...)public void pfMerge(byte[] destinationKey,
byte[]... sourceKeys)
RedisHyperLogLogCommandspfMerge in interface RedisHyperLogLogCommandsdestinationKey - must not be null.sourceKeys - must not be null.public void pfMerge(String destinationKey, String... sourceKeys)
StringRedisConnectionpfMerge in interface StringRedisConnectiondestinationKey - must not be null.sourceKeys - must not be null.RedisHyperLogLogCommands#pfMerge(byte[], byte[]...)public Set<byte[]> zRangeByLex(byte[] key)
RedisZSetCommandszRangeByLex in interface RedisZSetCommandskey - must not be null.public Set<byte[]> zRangeByLex(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandsRedisZSetCommands.Range from the sorted set at key in lexicographical ordering.zRangeByLex in interface RedisZSetCommandskey - must not be null.range - must not be null.public Set<byte[]> zRangeByLex(byte[] key, RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
RedisZSetCommandsRedisZSetCommands.Range from the sorted set at key in lexicographical ordering. Result is
limited via RedisZSetCommands.Limit.zRangeByLex in interface RedisZSetCommandskey - must not be null.range - must not be null.limit - must not be null.public Set<String> zRangeByLex(String key)
StringRedisConnectionzRangeByLex in interface StringRedisConnectionkey - must not be null.RedisZSetCommands.zRangeByLex(byte[])public Set<String> zRangeByLex(String key, RedisZSetCommands.Range range)
StringRedisConnectionRange from the sorted set at key in lexicographical ordering.zRangeByLex in interface StringRedisConnectionkey - must not be null.range - must not be null.RedisZSetCommands.zRangeByLex(byte[], Range)public Set<String> zRangeByLex(String key, RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
StringRedisConnectionRange from the sorted set at key in lexicographical ordering. Result is
limited via Limit.zRangeByLex in interface StringRedisConnectionkey - must not be null.range - must not be null.limit - can be null.RedisZSetCommands.zRangeByLex(byte[], Range, Limit)public Set<byte[]> zRevRangeByLex(byte[] key, RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
RedisZSetCommandsRedisZSetCommands.Range from the sorted set at key in reversed lexicographical ordering.
Result is limited via RedisZSetCommands.Limit.zRevRangeByLex in interface RedisZSetCommandskey - must not be null.range - must not be null.limit - must not be null.public Set<String> zRevRangeByLex(String key, RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
StringRedisConnectionRange from the sorted set at key in reversed lexicographical ordering.
Result is limited via Limit.zRevRangeByLex in interface StringRedisConnectionkey - must not be null.range - must not be null.limit - must not be null.RedisZSetCommands.zRevRangeByLex(byte[], Range, Limit)public void migrate(byte[] key,
RedisNode target,
int dbIndex,
@Nullable
RedisServerCommands.MigrateOption option)
RedisServerCommandsmigrate in interface RedisServerCommandskey - must not be null.target - must not be null.option - can be null. Defaulted to RedisServerCommands.MigrateOption.COPY.public void migrate(byte[] key,
RedisNode target,
int dbIndex,
@Nullable
RedisServerCommands.MigrateOption option,
long timeout)
RedisServerCommandsmigrate in interface RedisServerCommandskey - must not be null.target - must not be null.option - can be null. Defaulted to RedisServerCommands.MigrateOption.COPY.public Long xAck(String key, String group, RecordId... recordIds)
xAck in interface StringRedisConnectionpublic RecordId xAdd(StringRecord record, RedisStreamCommands.XAddOptions options)
StringRedisConnectionStringRecord to the stream stored at Record.getStream().xAdd in interface StringRedisConnectionrecord - must not be null.options - must not be null, use XAddOptions#none() instead.public List<RecordId> xClaimJustId(String key, String group, String consumer, RedisStreamCommands.XClaimOptions options)
StringRedisConnectionxClaimJustId in interface StringRedisConnectionkey - the key the stream is stored at.group - the name of the consumer group.consumer - the name of the new consumer.options - must not be null.ids that changed user.public List<StringRecord> xClaim(String key, String group, String consumer, RedisStreamCommands.XClaimOptions options)
StringRedisConnectionxClaim in interface StringRedisConnectionkey - the key the stream is stored at.group - the name of the consumer group.consumer - the name of the new consumer.options - must not be null.StringRecord that changed user.public Long xDel(String key, RecordId... recordIds)
xDel in interface StringRedisConnectionpublic String xGroupCreate(String key, ReadOffset readOffset, String group)
StringRedisConnectionxGroupCreate in interface StringRedisConnectionkey - the stream key.group - name of the consumer group.public String xGroupCreate(String key, ReadOffset readOffset, String group, boolean mkStream)
StringRedisConnectionxGroupCreate in interface StringRedisConnectionkey - the stream key.group - name of the consumer group.mkStream - if true the group will create the stream if needed (MKSTREAM)public Boolean xGroupDelConsumer(String key, Consumer consumer)
StringRedisConnectionxGroupDelConsumer in interface StringRedisConnectionkey - the stream key.consumer - consumer identified by group name and consumer key.public Boolean xGroupDestroy(String key, String group)
StringRedisConnectionxGroupDestroy in interface StringRedisConnectionkey - the stream key.group - name of the consumer group.public StreamInfo.XInfoStream xInfo(String key)
StringRedisConnectionxInfo in interface StringRedisConnectionkey - the key the stream is stored at.public StreamInfo.XInfoGroups xInfoGroups(String key)
StringRedisConnectionxInfoGroups in interface StringRedisConnectionkey - the key the stream is stored at.public StreamInfo.XInfoConsumers xInfoConsumers(String key, String groupName)
StringRedisConnectionxInfoConsumers in interface StringRedisConnectionkey - the key the stream is stored at.groupName - name of the consumer group.public Long xLen(String key)
StringRedisConnectionxLen in interface StringRedisConnectionkey - the stream key.public PendingMessagesSummary xPending(String key, String groupName)
StringRedisConnectionPendingMessagesSummary for a given consumer group.xPending in interface StringRedisConnectionkey - the key the stream is stored at. Must not be null.groupName - the name of the consumer group. Must not be null.public PendingMessages xPending(String key, String groupName, String consumer, Range<String> range, Long count)
StringRedisConnectionxPending in interface StringRedisConnectionkey - the key the stream is stored at. Must not be null.groupName - the name of the consumer group. Must not be null.consumer - 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.public PendingMessages xPending(String key, String groupName, Range<String> range, Long count)
StringRedisConnectionxPending in interface StringRedisConnectionkey - 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.public PendingMessages xPending(String key, String groupName, RedisStreamCommands.XPendingOptions options)
StringRedisConnectionmessages applying given options.xPending in interface StringRedisConnectionkey - 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.public List<StringRecord> xRange(String key, Range<String> range, RedisZSetCommands.Limit limit)
StringRedisConnectionRange applying a Limit.xRange in interface StringRedisConnectionkey - the stream key.range - must not be null.limit - must not be null.public List<StringRecord> xReadAsString(StreamReadOptions readOptions, StreamOffset<String>... streams)
StringRedisConnectionStreamOffsets.xReadAsString in interface StringRedisConnectionreadOptions - read arguments.streams - the streams to read from.public List<StringRecord> xReadGroupAsString(Consumer consumer, StreamReadOptions readOptions, StreamOffset<String>... streams)
StringRedisConnectionStreamOffsets using a consumer group.xReadGroupAsString in interface StringRedisConnectionconsumer - consumer/group.readOptions - read arguments.streams - the streams to read from.public List<StringRecord> xRevRange(String key, Range<String> range, RedisZSetCommands.Limit limit)
StringRedisConnectionRange applying a Limit in reverse order.xRevRange in interface StringRedisConnectionkey - the stream key.range - must not be null.limit - must not be null.public Long xTrim(String key, long count)
StringRedisConnectioncount elements.xTrim in interface StringRedisConnectionkey - the stream key.count - length of the stream.public Long xTrim(String key, long count, boolean approximateTrimming)
StringRedisConnectioncount elements.xTrim in interface StringRedisConnectionkey - the stream key.count - length of the stream.approximateTrimming - the trimming must be performed in a approximated way in order to maximize performances.public Long xAck(byte[] key, String group, RecordId... recordIds)
RedisStreamCommandsxAck in interface RedisStreamCommandskey - the key the stream is stored at.group - name of the consumer group.recordIds - the id's of the records to acknowledge.public RecordId xAdd(MapRecord<byte[],byte[],byte[]> record, RedisStreamCommands.XAddOptions options)
RedisStreamCommandsrecord to the stream stored at Record#getStream. If you prefer manual id
assignment over server generated ones make sure to provide an id via Record#withId.xAdd in interface RedisStreamCommandsrecord - the record to append.options - additional options (eg. MAXLEN). Must not be null, use
RedisStreamCommands.XAddOptions.none() instead.id after save. null when used in pipeline / transaction.public List<RecordId> xClaimJustId(byte[] key, String group, String newOwner, RedisStreamCommands.XClaimOptions options)
RedisStreamCommandsxClaimJustId in interface RedisStreamCommandskey - 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.public List<ByteRecord> xClaim(byte[] key, String group, String newOwner, RedisStreamCommands.XClaimOptions options)
RedisStreamCommandsxClaim in interface RedisStreamCommandskey - 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.ByteRecord that changed user.public Long xDel(byte[] key, RecordId... recordIds)
RedisStreamCommandsxDel in interface RedisStreamCommandskey - the key the stream is stored at.recordIds - the id's of the records to remove.public String xGroupCreate(byte[] key, String groupName, ReadOffset readOffset)
RedisStreamCommandsxGroupCreate in interface RedisStreamCommandskey - the key the stream is stored at.groupName - name of the consumer group to create.readOffset - the offset to start at.public String xGroupCreate(byte[] key, String groupName, ReadOffset readOffset, boolean mkStream)
RedisStreamCommandsxGroupCreate in interface RedisStreamCommandskey - the key the stream is stored at.groupName - name of the consumer group to create.readOffset - the offset to start at.mkStream - if true the group will create the stream if not already present (MKSTREAM)public Boolean xGroupDelConsumer(byte[] key, Consumer consumer)
RedisStreamCommandsxGroupDelConsumer in interface RedisStreamCommandskey - the key the stream is stored at.consumer - consumer identified by group name and consumer name.public Boolean xGroupDestroy(byte[] key, String groupName)
RedisStreamCommandsxGroupDestroy in interface RedisStreamCommandskey - the key the stream is stored at.groupName - name of the consumer group.public StreamInfo.XInfoStream xInfo(byte[] key)
RedisStreamCommandsxInfo in interface RedisStreamCommandskey - the key the stream is stored at.public StreamInfo.XInfoGroups xInfoGroups(byte[] key)
RedisStreamCommandsxInfoGroups in interface RedisStreamCommandskey - the key the stream is stored at.public StreamInfo.XInfoConsumers xInfoConsumers(byte[] key, String groupName)
RedisStreamCommandsxInfoConsumers in interface RedisStreamCommandskey - the key the stream is stored at.groupName - name of the consumer group.public Long xLen(byte[] key)
RedisStreamCommandsxLen in interface RedisStreamCommandskey - the key the stream is stored at.public PendingMessagesSummary xPending(byte[] key, String groupName)
RedisStreamCommandsPendingMessagesSummary for a given consumer group.xPending in interface RedisStreamCommandskey - the key the stream is stored at. Must not be null.groupName - the name of the consumer group. Must not be null.public PendingMessages xPending(byte[] key, String groupName, RedisStreamCommands.XPendingOptions options)
RedisStreamCommandsxPending in interface RedisStreamCommandskey - 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.public List<ByteRecord> xRange(byte[] key, Range<String> range, RedisZSetCommands.Limit limit)
RedisStreamCommandslimited number of records within a specific Range from the
stream stored at key. Range.unbounded() to read from the minimum and the maximum ID possible. RedisZSetCommands.Limit.unlimited() to read all records.xRange in interface RedisStreamCommandskey - the key the stream is stored at.range - must not be null.limit - must not be null.public List<ByteRecord> xRead(StreamReadOptions readOptions, StreamOffset<byte[]>... streams)
RedisStreamCommandsStreamOffsets.xRead in interface RedisStreamCommandsreadOptions - read arguments.streams - the streams to read from.public List<ByteRecord> xReadGroup(Consumer consumer, StreamReadOptions readOptions, StreamOffset<byte[]>... streams)
RedisStreamCommandsStreamOffsets using a consumer group.xReadGroup in interface RedisStreamCommandsconsumer - consumer/group.readOptions - read arguments.streams - the streams to read from.public List<ByteRecord> xRevRange(byte[] key, Range<String> range, RedisZSetCommands.Limit limit)
RedisStreamCommandsRange applying a RedisZSetCommands.Limit in reverse order.xRevRange in interface RedisStreamCommandskey - the stream key.range - must not be null.limit - must not be null.public Long xTrim(byte[] key, long count)
RedisStreamCommandscount elements.xTrim in interface RedisStreamCommandskey - the stream key.count - length of the stream.public Long xTrim(byte[] key, long count, boolean approximateTrimming)
RedisStreamCommandscount elements.xTrim in interface RedisStreamCommandskey - the stream key.count - length of the stream.approximateTrimming - the trimming must be performed in a approximated way in order to maximize performances.public void setDeserializePipelineAndTxResults(boolean deserializePipelineAndTxResults)
closePipeline() and exec() will be of the type returned by the underlying connectiondeserializePipelineAndTxResults - Whether or not to deserialize pipeline and tx resultspublic List<Long> bitField(byte[] key, BitFieldSubCommands subCommands)
RedisStringCommandskey.bitField in interface RedisStringCommandskey - must not be null.subCommands - must not be null.public List<Long> bitfield(String key, BitFieldSubCommands operation)
StringRedisConnectionkey.bitfield in interface StringRedisConnectionkey - must not be null.operation - must not be null.public RedisConnection getDelegate()
DecoratedRedisConnectionRedisConnection.getDelegate in interface DecoratedRedisConnectionCopyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.