@Deprecated public class JredisConnection extends AbstractRedisConnection
RedisConnection implementation on top of JRedis library.RedisStringCommands.BitOperation, RedisStringCommands.SetOptionRedisListCommands.PositionRedisZSetCommands.Aggregate, RedisZSetCommands.Limit, RedisZSetCommands.Range, RedisZSetCommands.TupleRedisServerCommands.MigrateOption, RedisServerCommands.ShutdownOptionRedisGeoCommands.DistanceUnit, RedisGeoCommands.GeoLocation<T>, RedisGeoCommands.GeoRadiusCommandArgs| Constructor and Description |
|---|
JredisConnection(org.jredis.JRedis jredis)
Deprecated.
Constructs a new
JredisConnection instance. |
JredisConnection(org.jredis.JRedis jredis,
Pool<org.jredis.JRedis> pool)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
Long |
append(byte[] key,
byte[] value)
Deprecated.
Append a
value to key. |
void |
bgReWriteAof()
Deprecated.
Start an Append Only File rewrite process on server.
|
void |
bgSave()
Deprecated.
Start background saving of db on server.
|
void |
bgWriteAof()
Deprecated.
As of 1.3, use
bgReWriteAof(). |
Long |
bitCount(byte[] key)
Deprecated.
Count the number of set bits (population counting) in value stored at
key. |
Long |
bitCount(byte[] key,
long begin,
long end)
Deprecated.
Count the number of set bits (population counting) of value stored at
key between begin and
end. |
Long |
bitOp(RedisStringCommands.BitOperation op,
byte[] destination,
byte[]... keys)
Deprecated.
Perform bitwise operations between strings.
|
List<byte[]> |
bLPop(int timeout,
byte[]... keys)
Deprecated.
Removes and returns first element from lists stored at
keys. |
List<byte[]> |
bRPop(int timeout,
byte[]... keys)
Deprecated.
Removes and returns last element from lists stored at
keys. |
byte[] |
bRPopLPush(int timeout,
byte[] srcKey,
byte[] dstKey)
Deprecated.
Remove the last element from list at
srcKey, append it to dstKey and return its value. |
void |
close()
Deprecated.
Closes (or quits) the connection.
|
List<Object> |
closePipeline()
Deprecated.
Executes the commands in the pipeline and returns their result.
|
protected DataAccessException |
convertJredisAccessException(Exception ex)
Deprecated.
|
Long |
dbSize()
Deprecated.
Get the total number of available keys in currently selected database.
|
Long |
decr(byte[] key)
Deprecated.
Decrement an integer value stored as string value of
key by 1. |
Long |
decrBy(byte[] key,
long value)
Deprecated.
Decrement an integer value stored as string value of
key by value. |
Long |
del(byte[]... keys)
Deprecated.
Delete given
keys. |
void |
discard()
Deprecated.
Discard all commands issued after
RedisTxCommands.multi(). |
byte[] |
dump(byte[] key)
Deprecated.
Retrieve serialized version of the value stored at
key. |
byte[] |
echo(byte[] message)
Deprecated.
Returns
message via server roundtrip. |
<T> T |
eval(byte[] script,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
Deprecated.
Evaluate given
script. |
<T> T |
evalSha(byte[] scriptSha1,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
Deprecated.
Evaluate given
scriptSha. |
<T> T |
evalSha(String scriptSha1,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
Deprecated.
Evaluate given
scriptSha. |
List<Object> |
exec()
Deprecated.
Executes all queued commands in a transaction started with
RedisTxCommands.multi(). |
Object |
execute(String command,
byte[]... args)
Deprecated.
'Native' or 'raw' execution of the given command along-side the given arguments.
|
Boolean |
exists(byte[] key)
Deprecated.
Determine if given
key exists. |
Boolean |
expire(byte[] key,
long seconds)
Deprecated.
Set time to live for given
key in seconds. |
Boolean |
expireAt(byte[] key,
long unixTime)
Deprecated.
Set the expiration for given
key as a UNIX timestamp. |
void |
flushAll()
Deprecated.
Delete all all keys from all databases.
|
void |
flushDb()
Deprecated.
Delete all keys of the currently selected database.
|
Long |
geoAdd(byte[] key,
Iterable<RedisGeoCommands.GeoLocation<byte[]>> locations)
Deprecated.
Add
RedisGeoCommands.GeoLocations to key |
Long |
geoAdd(byte[] key,
Map<byte[],Point> memberCoordinateMap)
Deprecated.
|
Long |
geoAdd(byte[] key,
Point point,
byte[] member)
Deprecated.
Add
Point with given member name to key. |
Long |
geoAdd(byte[] key,
RedisGeoCommands.GeoLocation<byte[]> location)
Deprecated.
Add
RedisGeoCommands.GeoLocation to key. |
Distance |
geoDist(byte[] key,
byte[] member1,
byte[] member2)
Deprecated.
Get the
Distance between member1 and member2. |
Distance |
geoDist(byte[] key,
byte[] member1,
byte[] member2,
Metric metric)
Deprecated.
|
List<String> |
geoHash(byte[] key,
byte[]... members)
Deprecated.
Get Geohash representation of the position for one or more members.
|
List<Point> |
geoPos(byte[] key,
byte[]... members)
Deprecated.
Get the
Point representation of positions for one or more members. |
GeoResults<RedisGeoCommands.GeoLocation<byte[]>> |
geoRadius(byte[] key,
Circle within)
Deprecated.
Get the members within the boundaries of a given
Circle. |
GeoResults<RedisGeoCommands.GeoLocation<byte[]>> |
geoRadius(byte[] key,
Circle within,
RedisGeoCommands.GeoRadiusCommandArgs args)
Deprecated.
Get the members within the boundaries of a given
Circle applying RedisGeoCommands.GeoRadiusCommandArgs. |
GeoResults<RedisGeoCommands.GeoLocation<byte[]>> |
geoRadiusByMember(byte[] key,
byte[] member,
Distance radius)
Deprecated.
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)
Deprecated.
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)
Deprecated.
Get the members within the circle defined by the members coordinates and given
radius.
|
Long |
geoRemove(byte[] key,
byte[]... members)
Deprecated.
Remove the members.
|
byte[] |
get(byte[] key)
Deprecated.
Get the value of
key. |
Boolean |
getBit(byte[] key,
long offset)
Deprecated.
Get the bit value at
offset of value at key. |
List<RedisClientInfo> |
getClientList()
Deprecated.
Request information and statistics about connected clients.
|
String |
getClientName()
Deprecated.
Returns the name of the current connection.
|
List<String> |
getConfig(String pattern)
Deprecated.
Load configuration parameters for given
pattern from server. |
org.jredis.JRedis |
getNativeConnection()
Deprecated.
Returns the native connection (the underlying library/driver object).
|
byte[] |
getRange(byte[] key,
long start,
long end)
Deprecated.
Get a substring of value of
key between begin and end. |
byte[] |
getSet(byte[] key,
byte[] value)
Deprecated.
Set
value of key and return its old value. |
Subscription |
getSubscription()
Deprecated.
Returns the current subscription for this connection or null if the connection is not subscribed.
|
Long |
hDel(byte[] key,
byte[]... fields)
Deprecated.
Delete given hash
fields. |
Boolean |
hExists(byte[] key,
byte[] field)
Deprecated.
Determine if given hash
field exists. |
byte[] |
hGet(byte[] key,
byte[] field)
Deprecated.
Get value for given
field from hash at key. |
Map<byte[],byte[]> |
hGetAll(byte[] key)
Deprecated.
Get entire hash stored at
key. |
Double |
hIncrBy(byte[] key,
byte[] field,
double delta)
Deprecated.
Increment
value of a hash field by the given delta. |
Long |
hIncrBy(byte[] key,
byte[] field,
long delta)
Deprecated.
Increment
value of a hash field by the given delta. |
Set<byte[]> |
hKeys(byte[] key)
Deprecated.
Get key set (fields) of hash at
key. |
Long |
hLen(byte[] key)
Deprecated.
Get size of hash at
key. |
List<byte[]> |
hMGet(byte[] key,
byte[]... fields)
Deprecated.
Get values for given
fields from hash at key. |
void |
hMSet(byte[] key,
Map<byte[],byte[]> values)
Deprecated.
Set multiple hash fields to multiple values using data provided in
hashes |
Cursor<Map.Entry<byte[],byte[]>> |
hScan(byte[] key,
ScanOptions options)
Deprecated.
Use a
Cursor to iterate over entries in hash at key. |
Boolean |
hSet(byte[] key,
byte[] field,
byte[] value)
Deprecated.
Set the
value of a hash field. |
Boolean |
hSetNX(byte[] key,
byte[] field,
byte[] value)
Deprecated.
Set the
value of a hash field only if field does not exist. |
List<byte[]> |
hVals(byte[] key)
Deprecated.
Get entry set (values) of hash at
field. |
Long |
incr(byte[] key)
Deprecated.
Increment an integer value stored as string value of
key by 1. |
Double |
incrBy(byte[] key,
double value)
Deprecated.
Increment a floating point number value of
key by delta. |
Long |
incrBy(byte[] key,
long value)
Deprecated.
Increment an integer value stored of
key by delta. |
Properties |
info()
Deprecated.
Load default server information like
memory
cpu utilization
replication
|
Properties |
info(String section)
Deprecated.
Load server information for given
selection. |
boolean |
isClosed()
Deprecated.
Indicates whether the underlying connection is closed or not.
|
boolean |
isPipelined()
Deprecated.
Indicates whether the connection is currently pipelined or not.
|
boolean |
isQueueing()
Deprecated.
Indicates whether the connection is in "queue"(or "MULTI") mode or not.
|
boolean |
isSubscribed()
Deprecated.
Indicates whether the current connection is subscribed (to at least one channel) or not.
|
Set<byte[]> |
keys(byte[] pattern)
Deprecated.
Find all keys matching the given
pattern. |
void |
killClient(String host,
int port)
Deprecated.
Closes a given client connection identified by host:port.
|
Long |
lastSave()
Deprecated.
Get time of last
RedisServerCommands.bgSave() operation in seconds. |
byte[] |
lIndex(byte[] key,
long index)
Deprecated.
Get element at
index form list at key. |
Long |
lInsert(byte[] key,
RedisListCommands.Position where,
byte[] pivot,
byte[] value)
Deprecated.
Insert
value RedisListCommands.Position.BEFORE or RedisListCommands.Position.AFTER existing pivot for key. |
Long |
lLen(byte[] key)
Deprecated.
Get the size of list stored at
key. |
byte[] |
lPop(byte[] key)
Deprecated.
Removes and returns first element in list stored at
key. |
Long |
lPush(byte[] key,
byte[]... values)
Deprecated.
Prepend
values to key. |
Long |
lPushX(byte[] key,
byte[] value)
Deprecated.
Prepend
values to key only if the list exists. |
List<byte[]> |
lRange(byte[] key,
long start,
long end)
Deprecated.
Get elements between
start and end from list at key. |
Long |
lRem(byte[] key,
long count,
byte[] value)
Deprecated.
Removes the first
count occurrences of value from the list stored at key. |
void |
lSet(byte[] key,
long index,
byte[] value)
Deprecated.
Set the
value list element at index. |
void |
lTrim(byte[] key,
long start,
long end)
Deprecated.
Trim list at
key to elements between start and end. |
List<byte[]> |
mGet(byte[]... keys)
Deprecated.
Get multiple
keys. |
void |
migrate(byte[] key,
RedisNode target,
int dbIndex,
RedisServerCommands.MigrateOption option)
Deprecated.
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)
Deprecated.
Atomically transfer a key from a source Redis instance to a destination Redis instance.
|
Boolean |
move(byte[] key,
int dbIndex)
Deprecated.
Move given
key to database with index. |
void |
mSet(Map<byte[],byte[]> tuple)
Deprecated.
Set multiple keys to multiple values using key-value pairs provided in
tuple. |
Boolean |
mSetNX(Map<byte[],byte[]> tuple)
Deprecated.
Set multiple keys to multiple values using key-value pairs provided in
tuple only if the provided key does
not exist. |
void |
multi()
Deprecated.
Mark the start of a transaction block.
|
void |
openPipeline()
Deprecated.
Activates the pipeline mode for this connection.
|
Boolean |
persist(byte[] key)
Deprecated.
Remove the expiration from given
key. |
Boolean |
pExpire(byte[] key,
long millis)
Deprecated.
Set time to live for given
key in milliseconds. |
Boolean |
pExpireAt(byte[] key,
long unixTimeInMillis)
Deprecated.
Set the expiration for given
key as a UNIX timestamp in milliseconds. |
Long |
pfAdd(byte[] key,
byte[]... values)
Deprecated.
Adds given values to the HyperLogLog stored at given key.
|
Long |
pfCount(byte[]... keys)
Deprecated.
Return the approximated cardinality of the structures observed by the HyperLogLog at key(s).
|
void |
pfMerge(byte[] destinationKey,
byte[]... sourceKeys)
Deprecated.
Merge N different HyperLogLogs at sourceKeys into a single destinationKey.
|
String |
ping()
Deprecated.
Test connection.
|
void |
pSetEx(byte[] key,
long milliseconds,
byte[] value)
Deprecated.
Set the
value and expiration in milliseconds for key. |
void |
pSubscribe(MessageListener listener,
byte[]... patterns)
Deprecated.
Subscribes the connection to all channels matching the given patterns.
|
Long |
pTtl(byte[] key)
Deprecated.
Get the precise time to live for
key in milliseconds. |
Long |
pTtl(byte[] key,
TimeUnit timeUnit)
Deprecated.
Get the precise time to live for
key in and convert it to the given TimeUnit. |
Long |
publish(byte[] channel,
byte[] message)
Deprecated.
Publishes the given message to the given channel.
|
byte[] |
randomKey()
Deprecated.
Return a random key from the keyspace.
|
void |
rename(byte[] oldName,
byte[] newName)
Deprecated.
Rename key
oldName to newName. |
Boolean |
renameNX(byte[] oldName,
byte[] newName)
Deprecated.
Rename key
oldName to newName only if newName does not exist. |
void |
resetConfigStats()
Deprecated.
Reset statistic counters on server.
|
void |
restore(byte[] key,
long ttlInMillis,
byte[] serializedValue)
Deprecated.
|
byte[] |
rPop(byte[] key)
Deprecated.
Removes and returns last element in list stored at
key. |
byte[] |
rPopLPush(byte[] srcKey,
byte[] dstKey)
Deprecated.
Remove the last element from list at
srcKey, append it to dstKey and return its value. |
Long |
rPush(byte[] key,
byte[]... values)
Deprecated.
Append
values to key. |
Long |
rPushX(byte[] key,
byte[] value)
Deprecated.
Append
values to key only if the list exists. |
Long |
sAdd(byte[] key,
byte[]... values)
Deprecated.
Add given
values to set at key. |
void |
save()
Deprecated.
Synchronous save current db snapshot on server.
|
Cursor<byte[]> |
scan(ScanOptions options)
Deprecated.
Use a
Cursor to iterate over keys. |
Long |
sCard(byte[] key)
Deprecated.
Get size of set at
key. |
List<Boolean> |
scriptExists(String... scriptSha1)
Deprecated.
Check if given
scriptShas exist in script cache. |
void |
scriptFlush()
Deprecated.
Flush lua script cache.
|
void |
scriptKill()
Deprecated.
Kill current lua script execution.
|
String |
scriptLoad(byte[] script)
Deprecated.
Load lua script into scripts cache, without executing it.
|
Set<byte[]> |
sDiff(byte[]... keys)
Deprecated.
Diff all sets for given
keys. |
Long |
sDiffStore(byte[] destKey,
byte[]... keys)
Deprecated.
Diff all sets for given
keys and store result in destKey. |
void |
select(int dbIndex)
Deprecated.
Select the DB with given positive
dbIndex. |
void |
set(byte[] key,
byte[] value)
Deprecated.
Set
value for key. |
void |
set(byte[] key,
byte[] value,
Expiration expiration,
RedisStringCommands.SetOption option)
Deprecated.
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)
Deprecated.
Sets the bit at
offset in value stored at key. |
void |
setClientName(byte[] name)
Deprecated.
Assign given name to current connection.
|
void |
setConfig(String param,
String value)
Deprecated.
Set server configuration for
param to value. |
void |
setEx(byte[] key,
long seconds,
byte[] value)
Deprecated.
Set the
value and expiration in seconds for key. |
Boolean |
setNX(byte[] key,
byte[] value)
Deprecated.
Set
value for key, only if key does not exist. |
void |
setRange(byte[] key,
byte[] value,
long start)
Deprecated.
Overwrite parts of
key starting at the specified offset with given value. |
void |
shutdown()
Deprecated.
Shutdown server.
|
void |
shutdown(RedisServerCommands.ShutdownOption option)
Deprecated.
Shutdown server.
|
Set<byte[]> |
sInter(byte[]... keys)
Deprecated.
Returns the members intersecting all given sets at
keys. |
Long |
sInterStore(byte[] destKey,
byte[]... keys)
Deprecated.
Intersect all given sets at
keys and store result in destKey. |
Boolean |
sIsMember(byte[] key,
byte[] value)
Deprecated.
Check if set at
key contains value. |
void |
slaveOf(String host,
int port)
Deprecated.
Change redis replication setting to new master.
|
void |
slaveOfNoOne()
Deprecated.
Change server into master.
|
Set<byte[]> |
sMembers(byte[] key)
Deprecated.
Get all elements of set at
key. |
Boolean |
sMove(byte[] srcKey,
byte[] destKey,
byte[] value)
Deprecated.
Move
value from srcKey to destKey |
List<byte[]> |
sort(byte[] key,
SortParameters params)
Deprecated.
Sort the elements for
key. |
Long |
sort(byte[] key,
SortParameters params,
byte[] storeKey)
Deprecated.
Sort the elements for
key and store result in storeKey. |
byte[] |
sPop(byte[] key)
Deprecated.
Remove and return a random member from set at
key. |
byte[] |
sRandMember(byte[] key)
Deprecated.
Get random element from set at
key. |
List<byte[]> |
sRandMember(byte[] key,
long count)
Deprecated.
Get
count random elements from set at key. |
Long |
sRem(byte[] key,
byte[]... values)
Deprecated.
Remove given
values from set at key and return the number of removed elements. |
Cursor<byte[]> |
sScan(byte[] key,
ScanOptions options)
Deprecated.
Use a
Cursor to iterate over elements in set at key. |
Long |
strLen(byte[] key)
Deprecated.
Get the length of the value stored at
key. |
void |
subscribe(MessageListener listener,
byte[]... channels)
Deprecated.
Subscribes the connection to the given channels.
|
Set<byte[]> |
sUnion(byte[]... keys)
Deprecated.
Union all sets at given
keys. |
Long |
sUnionStore(byte[] destKey,
byte[]... keys)
Deprecated.
Union all sets at given
keys and store result in destKey. |
Long |
time()
Deprecated.
Request server timestamp using
TIME command. |
Long |
ttl(byte[] key)
Deprecated.
Get the time to live for
key in seconds. |
Long |
ttl(byte[] key,
TimeUnit timeUnit)
Deprecated.
Get the time to live for
key in and convert it to the given TimeUnit. |
DataType |
type(byte[] key)
Deprecated.
Determine the type stored at
key. |
void |
unwatch()
Deprecated.
Flushes all the previously
#watch(byte[]...) keys. |
void |
watch(byte[]... keys)
Deprecated.
Watch given
keys for modifications during transaction started with RedisTxCommands.multi(). |
Boolean |
zAdd(byte[] key,
double score,
byte[] value)
Deprecated.
Add
value to a sorted set at key, or update its score if it already exists. |
Long |
zAdd(byte[] key,
Set<RedisZSetCommands.Tuple> tuples)
Deprecated.
Add
tuples to a sorted set at key, or update its score if it already exists. |
Long |
zCard(byte[] key)
Deprecated.
Get the size of sorted set with
key. |
Long |
zCount(byte[] key,
double min,
double max)
Deprecated.
Count number of elements within sorted set with scores between
min and max. |
Long |
zCount(byte[] key,
RedisZSetCommands.Range range)
Deprecated.
Count number of elements within sorted set with scores between
Range#min and Range#max. |
Double |
zIncrBy(byte[] key,
double increment,
byte[] value)
Deprecated.
Increment the score of element with
value in sorted set by increment. |
Long |
zInterStore(byte[] destKey,
byte[]... sets)
Deprecated.
Intersect sorted
sets and store result in destination key. |
Long |
zInterStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
byte[]... sets)
Deprecated.
Intersect sorted
sets and store result in destination key. |
Set<byte[]> |
zRange(byte[] key,
long start,
long end)
Deprecated.
Get elements between
start and end from sorted set. |
Set<byte[]> |
zRangeByLex(byte[] key)
Deprecated.
Get all the elements in the sorted set at key in lexicographical ordering.
|
Set<byte[]> |
zRangeByLex(byte[] key,
RedisZSetCommands.Range range)
Deprecated.
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)
Deprecated.
Get all the elements in
RedisZSetCommands.Range from the sorted set at key in lexicographical ordering. |
Set<byte[]> |
zRangeByScore(byte[] key,
double min,
double max)
Deprecated.
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)
Deprecated.
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)
Deprecated.
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)
Deprecated.
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)
Deprecated.
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)
Deprecated.
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)
Deprecated.
|
Set<RedisZSetCommands.Tuple> |
zRangeByScoreWithScores(byte[] key,
double min,
double max,
long offset,
long count)
Deprecated.
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)
Deprecated.
|
Set<RedisZSetCommands.Tuple> |
zRangeByScoreWithScores(byte[] key,
RedisZSetCommands.Range range,
RedisZSetCommands.Limit limit)
Deprecated.
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<RedisZSetCommands.Tuple> |
zRangeWithScores(byte[] key,
long start,
long end)
Deprecated.
|
Long |
zRank(byte[] key,
byte[] value)
Deprecated.
Determine the index of element with
value in a sorted set. |
Long |
zRem(byte[] key,
byte[]... values)
Deprecated.
Remove
values from sorted set. |
Long |
zRemRange(byte[] key,
long start,
long end)
Deprecated.
Remove elements in range between
start and end from sorted set with key. |
Long |
zRemRangeByScore(byte[] key,
double min,
double max)
Deprecated.
Remove elements with scores between
min and max from sorted set with key. |
Long |
zRemRangeByScore(byte[] key,
RedisZSetCommands.Range range)
Deprecated.
Remove elements with scores between
Range#min and Range#max from sorted set with key. |
Set<byte[]> |
zRevRange(byte[] key,
long start,
long end)
Deprecated.
Get elements in range from
start to end from sorted set ordered from high to low. |
Set<byte[]> |
zRevRangeByScore(byte[] key,
double min,
double max)
Deprecated.
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)
Deprecated.
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)
Deprecated.
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)
Deprecated.
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<RedisZSetCommands.Tuple> |
zRevRangeByScoreWithScores(byte[] key,
double min,
double max)
Deprecated.
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)
Deprecated.
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)
Deprecated.
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)
Deprecated.
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<RedisZSetCommands.Tuple> |
zRevRangeWithScores(byte[] key,
long start,
long end)
Deprecated.
Get set of
RedisZSetCommands.Tuples in range from start to end from sorted set ordered from high to low. |
Long |
zRevRank(byte[] key,
byte[] value)
Deprecated.
Determine the index of element with
value in a sorted set when scored high to low. |
Cursor<RedisZSetCommands.Tuple> |
zScan(byte[] key,
ScanOptions options)
Deprecated.
Use a
Cursor to iterate over elements in sorted set at key. |
Double |
zScore(byte[] key,
byte[] value)
Deprecated.
Get the score of element with
value from sorted set with key key. |
Long |
zUnionStore(byte[] destKey,
byte[]... sets)
Deprecated.
Union sorted
sets and store result in destination key. |
Long |
zUnionStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
byte[]... sets)
Deprecated.
Union sorted
sets and store result in destination key. |
getSentinelConnection, getSentinelConnection, hasRedisSentinelConfigured, isActive, setSentinelConfigurationpublic JredisConnection(org.jredis.JRedis jredis)
JredisConnection instance.jredis - JRedis connectionpublic JredisConnection(org.jredis.JRedis jredis,
Pool<org.jredis.JRedis> pool)
protected DataAccessException convertJredisAccessException(Exception ex)
public Object execute(String command, byte[]... args)
RedisCommandscommand - Command to executeargs - Possible command arguments (may be null)public void close()
throws RedisSystemException
RedisConnectionclose in interface RedisConnectionclose in class AbstractRedisConnectionRedisSystemExceptionpublic org.jredis.JRedis getNativeConnection()
RedisConnectionpublic boolean isClosed()
RedisConnectionpublic boolean isQueueing()
RedisConnectionpublic boolean isPipelined()
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.RedisTxCommands.multi()public List<Object> closePipeline()
RedisConnectionpublic List<byte[]> sort(byte[] key, SortParameters params)
RedisKeyCommandskey.key - must not be null.params - must not be null.public Long sort(byte[] key, SortParameters params, byte[] storeKey)
RedisKeyCommandskey and store result in storeKey.key - must not be null.params - must not be null.storeKey - must not be null.public Long dbSize()
RedisServerCommandspublic void flushDb()
RedisServerCommandspublic void flushAll()
RedisServerCommandspublic byte[] echo(byte[] message)
RedisConnectionCommandsmessage via server roundtrip.message - the message to echo.public String ping()
RedisConnectionCommandspublic void bgSave()
RedisServerCommandspublic void bgReWriteAof()
RedisServerCommands@Deprecated public void bgWriteAof()
bgReWriteAof().RedisServerCommandspublic void save()
RedisServerCommandspublic List<String> getConfig(String pattern)
RedisServerCommandspattern from server.public Properties info()
RedisServerCommandspublic Properties info(String section)
RedisServerCommandsselection.public Long lastSave()
RedisServerCommandsRedisServerCommands.bgSave() operation in seconds.public void setConfig(String param, String value)
RedisServerCommandsparam to value.public void resetConfigStats()
RedisServerCommandsRedisServerCommands.info().public void shutdown()
RedisServerCommandspublic void shutdown(RedisServerCommands.ShutdownOption option)
RedisServerCommandspublic Long del(byte[]... keys)
RedisKeyCommandskeys.keys - must not be null.public void discard()
RedisTxCommandsRedisTxCommands.multi().public List<Object> exec()
RedisTxCommandsRedisTxCommands.multi(). #watch(byte[]...) the operation will fail if any of watched keys has been modified.public Boolean exists(byte[] key)
RedisKeyCommandskey exists.key - must not be null.public Boolean expire(byte[] key, long seconds)
RedisKeyCommandskey in seconds.key - must not be null.public Boolean expireAt(byte[] key, long unixTime)
RedisKeyCommandskey as a UNIX timestamp.key - must not be null.public Boolean pExpire(byte[] key, long millis)
RedisKeyCommandskey in milliseconds.key - must not be null.public Boolean pExpireAt(byte[] key, long unixTimeInMillis)
RedisKeyCommandskey as a UNIX timestamp in milliseconds.key - must not be null.public Long pTtl(byte[] key)
RedisKeyCommandskey in milliseconds.key - must not be null.public Long pTtl(byte[] key, TimeUnit timeUnit)
RedisKeyCommandskey in and convert it to the given TimeUnit.key - must not be null.timeUnit - must not be null.public byte[] dump(byte[] key)
RedisKeyCommandskey.key - must not be null.public void restore(byte[] key,
long ttlInMillis,
byte[] serializedValue)
RedisKeyCommandskey - must not be null.serializedValue - must not be null.public Set<byte[]> keys(byte[] pattern)
RedisKeyCommandspattern.pattern - must not be null.public void multi()
RedisTxCommandsRedisTxCommands.exec() or rolled back using RedisTxCommands.discard()
public Boolean persist(byte[] key)
RedisKeyCommandskey.key - must not be null.public Boolean move(byte[] key, int dbIndex)
RedisKeyCommandskey to database with index.key - must not be null.public byte[] randomKey()
RedisKeyCommandspublic void rename(byte[] oldName,
byte[] newName)
RedisKeyCommandsoldName to newName.oldName - must not be null.newName - must not be null.public Boolean renameNX(byte[] oldName, byte[] newName)
RedisKeyCommandsoldName to newName only if newName does not exist.oldName - must not be null.newName - must not be null.public void select(int dbIndex)
RedisConnectionCommandsdbIndex.dbIndex - the database index.public Long ttl(byte[] key)
RedisKeyCommandskey in seconds.key - must not be null.public Long ttl(byte[] key, TimeUnit timeUnit)
RedisKeyCommandskey in and convert it to the given TimeUnit.key - must not be null.timeUnit - must not be null.public DataType type(byte[] key)
RedisKeyCommandskey.key - must not be null.public void unwatch()
RedisTxCommands#watch(byte[]...) keys.public void watch(byte[]... keys)
RedisTxCommandskeys for modifications during transaction started with RedisTxCommands.multi().keys - must not be null.public byte[] get(byte[] key)
RedisStringCommandskey.key - must not be null.public void set(byte[] key,
byte[] value)
RedisStringCommandsvalue for key.key - must not be null.value - must not be null.public void 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.key - must not be null.value - must not be null.expiration - can be null. Defaulted to Expiration.persistent().option - can be null. Defaulted to RedisStringCommands.SetOption.UPSERT.public byte[] getSet(byte[] key,
byte[] value)
RedisStringCommandsvalue of key and return its old value.key - must not be null.public Long append(byte[] key, byte[] value)
RedisStringCommandsvalue to key.key - must not be null.public List<byte[]> mGet(byte[]... keys)
RedisStringCommandskeys. Values are returned in the order of the requested keys.keys - must not be null.public void mSet(Map<byte[],byte[]> tuple)
RedisStringCommandstuple.tuple - must not be null.public Boolean mSetNX(Map<byte[],byte[]> tuple)
RedisStringCommandstuple only if the provided key does
not exist.tuple - must not be null.public void setEx(byte[] key,
long seconds,
byte[] value)
RedisStringCommandsvalue and expiration in seconds for key.key - must not be null.value - must not be null.public void pSetEx(byte[] key,
long milliseconds,
byte[] value)
RedisStringCommandsvalue and expiration in milliseconds for key.key - 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.key - must not be null.value - must not be null.public byte[] getRange(byte[] key,
long start,
long end)
RedisStringCommandskey between begin and end.key - must not be null.public Long decr(byte[] key)
RedisStringCommandskey by 1.key - must not be null.public Long decrBy(byte[] key, long value)
RedisStringCommandskey by value.key - must not be null.public Long incr(byte[] key)
RedisStringCommandskey by 1.key - must not be null.public Long incrBy(byte[] key, long value)
RedisStringCommandskey by delta.key - must not be null.public Double incrBy(byte[] key, double value)
RedisStringCommandskey by delta.key - must not be null.public Boolean getBit(byte[] key, long offset)
RedisStringCommandsoffset of value at key.key - must not be null.public Boolean setBit(byte[] key, long offset, boolean value)
RedisStringCommandsoffset in value stored at key.key - must not be null.offset.public void setRange(byte[] key,
byte[] value,
long start)
RedisStringCommandskey starting at the specified offset with given value.key - must not be null.public Long strLen(byte[] key)
RedisStringCommandskey.key - must not be null.public Long bitCount(byte[] key)
RedisStringCommandskey.key - must not be null.public Long bitCount(byte[] key, long begin, long end)
RedisStringCommandskey between begin and
end.key - must not be null.public Long bitOp(RedisStringCommands.BitOperation op, byte[] destination, byte[]... keys)
RedisStringCommandsop - must not be null.destination - must not be null.keys - must not be null.public List<byte[]> bLPop(int timeout, byte[]... keys)
RedisListCommandskeys. timeout reached.keys - must not be null.RedisListCommands.lPop(byte[])public List<byte[]> bRPop(int timeout, byte[]... keys)
RedisListCommandskeys. timeout reached.keys - must not be null.RedisListCommands.rPop(byte[])public byte[] lIndex(byte[] key,
long index)
RedisListCommandsindex form list at key.key - must not be null.public Long lLen(byte[] key)
RedisListCommandskey.key - must not be null.public byte[] lPop(byte[] key)
RedisListCommandskey.key - must not be null.public Long lPush(byte[] key, byte[]... values)
RedisListCommandsvalues to key.key - must not be null.public List<byte[]> lRange(byte[] key, long start, long end)
RedisListCommandsstart and end from list at key.key - must not be null.public Long lRem(byte[] key, long count, byte[] value)
RedisListCommandscount occurrences of value from the list stored at key.key - must not be null.public void lSet(byte[] key,
long index,
byte[] value)
RedisListCommandsvalue list element at index.key - must not be null.public void lTrim(byte[] key,
long start,
long end)
RedisListCommandskey to elements between start and end.key - must not be null.public byte[] rPop(byte[] key)
RedisListCommandskey.key - must not be null.public byte[] rPopLPush(byte[] srcKey,
byte[] dstKey)
RedisListCommandssrcKey, append it to dstKey and return its value.srcKey - must not be null.dstKey - must not be null.public Long rPush(byte[] key, byte[]... values)
RedisListCommandsvalues to key.key - must not be null.public Long lInsert(byte[] key, RedisListCommands.Position where, byte[] pivot, byte[] value)
RedisListCommandsvalue RedisListCommands.Position.BEFORE or RedisListCommands.Position.AFTER existing pivot for key.key - must not be null.where - must not be null.public byte[] bRPopLPush(int timeout,
byte[] srcKey,
byte[] dstKey)
RedisListCommandssrcKey, append it to dstKey and return its value.
timeout reached.srcKey - must not be null.dstKey - must not be null.RedisListCommands.rPopLPush(byte[], byte[])public Long lPushX(byte[] key, byte[] value)
RedisListCommandsvalues to key only if the list exists.key - must not be null.public Long rPushX(byte[] key, byte[] value)
RedisListCommandsvalues to key only if the list exists.key - must not be null.public Long sAdd(byte[] key, byte[]... values)
RedisSetCommandsvalues to set at key.key - must not be null.public Long sCard(byte[] key)
RedisSetCommandskey.key - must not be null.public Set<byte[]> sDiff(byte[]... keys)
RedisSetCommandskeys.keys - must not be null.public Long sDiffStore(byte[] destKey, byte[]... keys)
RedisSetCommandskeys and store result in destKey.destKey - must not be null.keys - must not be null.public Set<byte[]> sInter(byte[]... keys)
RedisSetCommandskeys.keys - must not be null.public Long sInterStore(byte[] destKey, byte[]... keys)
RedisSetCommandskeys and store result in destKey.destKey - must not be null.keys - must not be null.public Boolean sIsMember(byte[] key, byte[] value)
RedisSetCommandskey contains value.key - must not be null.public Set<byte[]> sMembers(byte[] key)
RedisSetCommandskey.key - must not be null.public Boolean sMove(byte[] srcKey, byte[] destKey, byte[] value)
RedisSetCommandsvalue from srcKey to destKeysrcKey - must not be null.destKey - must not be null.public byte[] sPop(byte[] key)
RedisSetCommandskey.key - must not be null.public byte[] sRandMember(byte[] key)
RedisSetCommandskey.key - must not be null.public List<byte[]> sRandMember(byte[] key, long count)
RedisSetCommandscount random elements from set at key.key - must not be null.public Long sRem(byte[] key, byte[]... values)
RedisSetCommandsvalues from set at key and return the number of removed elements.key - must not be null.public Set<byte[]> sUnion(byte[]... keys)
RedisSetCommandskeys.keys - must not be null.public Long sUnionStore(byte[] destKey, byte[]... keys)
RedisSetCommandskeys and store result in destKey.destKey - must not be null.keys - must not be null.public Boolean zAdd(byte[] key, double score, byte[] value)
RedisZSetCommandsvalue to a sorted set at key, or update its score if it already exists.key - must not be null.score - the score.value - the value.public Long zAdd(byte[] key, Set<RedisZSetCommands.Tuple> tuples)
RedisZSetCommandstuples to a sorted set at key, or update its score if it already exists.key - must not be null.tuples - must not be null.public Long zCard(byte[] key)
RedisZSetCommandskey.key - must not be null.public Long zCount(byte[] key, double min, double max)
RedisZSetCommandsmin and max.key - must not be null.public Long zCount(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandsRange#min and Range#max.key - must not be null.range - must not be null.public Double zIncrBy(byte[] key, double increment, byte[] value)
RedisZSetCommandsvalue in sorted set by increment.key - must not be null.value - the value.public Long zInterStore(byte[] destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, byte[]... sets)
RedisZSetCommandssets and store result in destination key.destKey - must not be null.aggregate - must not be null.sets - must not be null.public Long zInterStore(byte[] destKey, byte[]... sets)
RedisZSetCommandssets and store result in destination key.destKey - 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.key - must not be null.public Set<RedisZSetCommands.Tuple> zRangeWithScores(byte[] key, long start, long end)
RedisZSetCommandskey - must not be null.public Set<byte[]> zRangeByScore(byte[] key, double min, double max)
RedisZSetCommandsmin and max from sorted set.key - must not be null.public Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key, double min, double max)
RedisZSetCommandskey - must not be null.public Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandskey - must not be null.range - must not be null.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.key - must not be null.range - must not be null.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.key - must not be null.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.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.key - must not be null.public Set<byte[]> zRevRangeByScore(byte[] key, double min, double max)
RedisZSetCommandsmin and max from sorted set ordered from high to low.key - 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.key - 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.key - must not be null.public Long zRank(byte[] key, byte[] value)
RedisZSetCommandsvalue in a sorted set.key - must not be null.value - the value.public Long zRem(byte[] key, byte[]... values)
RedisZSetCommandsvalues from sorted set. Return number of removed elements.key - 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.key - must not be null.public Long zRemRangeByScore(byte[] key, double min, double max)
RedisZSetCommandsmin and max from sorted set with key.key - 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.key - must not be null.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.key - must not be null.public Long zRevRank(byte[] key, byte[] value)
RedisZSetCommandsvalue in a sorted set when scored high to low.key - must not be null.value - the value.public Double zScore(byte[] key, byte[] value)
RedisZSetCommandsvalue from sorted set with key key.key - must not be null.value - the value.public Long zUnionStore(byte[] destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, byte[]... sets)
RedisZSetCommandssets and store result in destination key.destKey - must not be null.aggregate - must not be null.sets - must not be null.public Long zUnionStore(byte[] destKey, byte[]... sets)
RedisZSetCommandssets and store result in destination key.destKey - must not be null.sets - must not be null.public Long hDel(byte[] key, byte[]... fields)
RedisHashCommandsfields.key - must not be null.fields - must not be null.public Boolean hExists(byte[] key, byte[] field)
RedisHashCommandsfield exists.key - must not be null.field - must not be null.public byte[] hGet(byte[] key,
byte[] field)
RedisHashCommandsfield from hash at key.key - must not be null.field - must not be null.public Map<byte[],byte[]> hGetAll(byte[] key)
RedisHashCommandskey.key - must not be null.public Long hIncrBy(byte[] key, byte[] field, long delta)
RedisHashCommandsvalue of a hash field by the given delta.key - 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.key - must not be null.public Set<byte[]> hKeys(byte[] key)
RedisHashCommandskey.key - must not be null.public Long hLen(byte[] key)
RedisHashCommandskey.key - must not be null.public List<byte[]> hMGet(byte[] key, byte[]... fields)
RedisHashCommandsfields from hash at key.key - must not be null.fields - must not be null.public void hMSet(byte[] key,
Map<byte[],byte[]> values)
RedisHashCommandshasheskey - must not be null.values - must not be null.public Boolean hSet(byte[] key, byte[] field, byte[] value)
RedisHashCommandsvalue of a hash field.key - must not be null.field - must not be null.public Boolean hSetNX(byte[] key, byte[] field, byte[] value)
RedisHashCommandsvalue of a hash field only if field does not exist.key - must not be null.field - must not be null.public List<byte[]> hVals(byte[] key)
RedisHashCommandsfield.key - must not be null.public Subscription getSubscription()
RedisPubSubCommandspublic boolean isSubscribed()
RedisPubSubCommandspublic void pSubscribe(MessageListener listener, byte[]... patterns)
RedisPubSubCommandsNote that this operation is blocking and the current thread starts waiting for new messages immediately.
listener - message listener, must not be null.patterns - channel name patterns, must not be null.public Long publish(byte[] channel, byte[] message)
RedisPubSubCommandschannel - the channel to publish to, must not be null.message - message to publishpublic void subscribe(MessageListener listener, byte[]... channels)
RedisPubSubCommandsNote that this operation is blocking and the current thread starts waiting for new messages immediately.
listener - message listener, must not be null.channels - channel names, must not be null.public Long geoAdd(byte[] key, Point point, byte[] member)
RedisGeoCommandsPoint with given member name to key.key - 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.key - must not be null.location - must not be null.public Long geoAdd(byte[] key, Map<byte[],Point> memberCoordinateMap)
RedisGeoCommandskey - must not be null.memberCoordinateMap - must not be null.public Long geoAdd(byte[] key, Iterable<RedisGeoCommands.GeoLocation<byte[]>> locations)
RedisGeoCommandsRedisGeoCommands.GeoLocations to keykey - must not be null.locations - must not be null.public Distance geoDist(byte[] key, byte[] member1, byte[] member2)
RedisGeoCommandsDistance between member1 and member2.key - must not be null.member1 - must not be null.member2 - must not be null.public Distance geoDist(byte[] key, byte[] member1, byte[] member2, Metric metric)
RedisGeoCommandskey - must not be null.member1 - must not be null.member2 - must not be null.metric - must not be null.public List<String> geoHash(byte[] key, byte[]... members)
RedisGeoCommandskey - must not be null.members - must not be null.public List<Point> geoPos(byte[] key, byte[]... members)
RedisGeoCommandsPoint representation of positions for one or more members.key - must not be null.members - must not be null.public GeoResults<RedisGeoCommands.GeoLocation<byte[]>> geoRadius(byte[] key, Circle within)
RedisGeoCommandsCircle.key - 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.key - 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)
RedisGeoCommandskey - must not be null.member - must not be null.public GeoResults<RedisGeoCommands.GeoLocation<byte[]>> geoRadiusByMember(byte[] key, byte[] member, Distance radius)
RedisGeoCommandsDistance.key - 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.key - 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)
RedisGeoCommandskey - must not be null.members - must not be null.public void scriptFlush()
RedisScriptingCommandspublic void scriptKill()
RedisScriptingCommandspublic String scriptLoad(byte[] script)
RedisScriptingCommands#evalSha(byte[], ReturnType, int, byte[]...).script - must not be null.public List<Boolean> scriptExists(String... scriptSha1)
RedisScriptingCommandsscriptShas exist in script cache.public <T> T eval(byte[] script,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
RedisScriptingCommandsscript.script - 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.scriptSha1 - 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.scriptSha1 - must not be null.returnType - must not be null.keysAndArgs - must not be null.public Long time()
RedisServerCommandsTIME command.public void killClient(String host, int port)
RedisServerCommandshost - of connection to close.port - of connection to closepublic void setClientName(byte[] name)
RedisServerCommandspublic void slaveOf(String host, int port)
RedisServerCommandshost - must not be null.public String getClientName()
RedisServerCommandspublic List<RedisClientInfo> getClientList()
RedisServerCommandsList of RedisClientInfo objects.public void slaveOfNoOne()
RedisServerCommandspublic Cursor<byte[]> scan(ScanOptions options)
RedisKeyCommandsCursor to iterate over keys.options - must not be null.public Cursor<RedisZSetCommands.Tuple> zScan(byte[] key, ScanOptions options)
RedisZSetCommandsCursor to iterate over elements in sorted set at key.key - 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.key - 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.key - must not be null.options - must not be null.public Set<byte[]> zRangeByScore(byte[] key, String min, String max)
RedisZSetCommandsmin and max from sorted set.key - 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.key - must not be null.min - must not be null.max - must not be null.public Long pfAdd(byte[] key, byte[]... values)
HyperLogLogCommandskey - must not be null.values - must not be null.public Long pfCount(byte[]... keys)
HyperLogLogCommandskeys - must not be null.public void pfMerge(byte[] destinationKey,
byte[]... sourceKeys)
HyperLogLogCommandsdestinationKey - must not be null.sourceKeys - must not be null.public Set<byte[]> zRangeByLex(byte[] key)
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.key - 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.key - must not be null.range - 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.key - must not be null.range - must not be null.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.key - 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.key - must not be null.range - must not be null.public Long zRemRangeByScore(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandsRange#min and Range#max from sorted set with key.key - must not be null.range - must not be null.public Set<byte[]> zRangeByScore(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandsRange#min and Range#max from sorted set.key - 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.key - must not be null.range - 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.key - must not be null.range - must not be null.public void migrate(byte[] key,
RedisNode target,
int dbIndex,
RedisServerCommands.MigrateOption option)
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,
RedisServerCommands.MigrateOption option,
long timeout)
RedisServerCommandskey - must not be null.target - must not be null.option - can be null. Defaulted to RedisServerCommands.MigrateOption.COPY.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.