public class JedisClusterConnection extends Object implements RedisClusterConnection
RedisClusterConnection implementation on top of JedisCluster.JedisCluster api where possible and falls back to direct node communication using
Jedis where needed.| Modifier and Type | Class and Description |
|---|---|
protected static interface |
JedisClusterConnection.JedisClusterCommandCallback<T>
Jedis specific ClusterCommandExecutor.ClusterCommandCallback. |
protected static interface |
JedisClusterConnection.JedisMultiKeyClusterCommandCallback<T>
Jedis specific ClusterCommandExecutor.MultiKeyClusterCommandCallback. |
RedisStringCommands.BitOperation, RedisStringCommands.SetOptionRedisListCommands.PositionRedisZSetCommands.Aggregate, RedisZSetCommands.Limit, RedisZSetCommands.Range, RedisZSetCommands.TupleRedisServerCommands.MigrateOption, RedisServerCommands.ShutdownOptionRedisGeoCommands.DistanceUnit, RedisGeoCommands.GeoLocation<T>, RedisGeoCommands.GeoRadiusCommandArgsRedisClusterCommands.AddSlots| Constructor and Description |
|---|
JedisClusterConnection(redis.clients.jedis.JedisCluster cluster)
Create new
JedisClusterConnection utilizing native connections via JedisCluster. |
JedisClusterConnection(redis.clients.jedis.JedisCluster cluster,
ClusterCommandExecutor executor)
Create new
JedisClusterConnection utilizing native connections via JedisCluster running commands
across the cluster via given ClusterCommandExecutor. |
| Modifier and Type | Method and Description |
|---|---|
Long |
append(byte[] key,
byte[] value)
Append a
value to key. |
void |
bgReWriteAof()
Start an Append Only File rewrite process on server.
|
void |
bgReWriteAof(RedisClusterNode node) |
void |
bgSave()
Start background saving of db on server.
|
void |
bgSave(RedisClusterNode node) |
void |
bgWriteAof()
Start an Append Only File rewrite process on server.
|
Long |
bitCount(byte[] key)
Count the number of set bits (population counting) in value stored at
key. |
Long |
bitCount(byte[] key,
long begin,
long end)
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)
Perform bitwise operations between strings.
|
List<byte[]> |
bLPop(int timeout,
byte[]... 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 (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 (see
RedisListCommands.rPopLPush(byte[], byte[])). |
void |
close()
Closes (or quits) the connection.
|
List<Object> |
closePipeline()
Executes the commands in the pipeline and returns their result.
|
void |
clusterAddSlots(RedisClusterNode node,
int... slots)
Assign slots to given
RedisClusterNode. |
void |
clusterAddSlots(RedisClusterNode node,
RedisClusterNode.SlotRange range)
Assign
RedisClusterNode.SlotRange.getSlotsArray() to given RedisClusterNode. |
Long |
clusterCountKeysInSlot(int slot)
Count the number of keys assigned to one slot.
|
void |
clusterDeleteSlots(RedisClusterNode node,
int... slots)
Remove slots from
RedisClusterNode. |
void |
clusterDeleteSlotsInRange(RedisClusterNode node,
RedisClusterNode.SlotRange range)
Removes
RedisClusterNode.SlotRange.getSlotsArray() from given RedisClusterNode. |
void |
clusterForget(RedisClusterNode node)
Remove given node from cluster.
|
ClusterInfo |
clusterGetClusterInfo()
Get cluster information.
|
List<byte[]> |
clusterGetKeysInSlot(int slot,
Integer count)
Get keys served by slot.
|
Map<RedisClusterNode,Collection<RedisClusterNode>> |
clusterGetMasterSlaveMap()
Retrieve information about masters and their connected slaves.
|
RedisClusterNode |
clusterGetNodeForKey(byte[] key)
Find the
RedisClusterNode serving given key. |
RedisClusterNode |
clusterGetNodeForSlot(int slot)
Find the
RedisClusterNode serving given slot. |
Set<RedisClusterNode> |
clusterGetNodes()
Retrieve cluster node information such as id, host, port and slots.
|
Set<RedisClusterNode> |
clusterGetSlaves(RedisClusterNode master)
Retrieve information about connected slaves for given master node.
|
Integer |
clusterGetSlotForKey(byte[] key)
Find the slot for a given
key. |
void |
clusterMeet(RedisClusterNode node)
Add given node to cluster.
|
void |
clusterReplicate(RedisClusterNode master,
RedisClusterNode slave)
Assign a slave to given master.
|
void |
clusterSetSlot(RedisClusterNode node,
int slot,
RedisClusterCommands.AddSlots mode) |
protected DataAccessException |
convertJedisAccessException(Exception ex) |
Long |
dbSize()
Get the total number of available keys in currently selected database.
|
Long |
dbSize(RedisClusterNode node) |
Long |
decr(byte[] key)
Decrement value of
key by 1. |
Long |
decrBy(byte[] key,
long value)
Increment value of
key by value. |
Long |
del(byte[]... 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. |
<T> T |
eval(byte[] script,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
Evaluate given
script. |
<T> T |
evalSha(byte[] scriptSha,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
Evaluate given
scriptSha. |
<T> T |
evalSha(String scriptSha,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
Evaluate given
scriptSha. |
List<Object> |
exec()
Executes all queued commands in a transaction started with
RedisTxCommands.multi(). |
Object |
execute(String command,
byte[]... args)
'Native' or 'raw' execution of the given command along-side the given arguments.
|
Boolean |
exists(byte[] key)
Determine if given
key exists. |
Boolean |
expire(byte[] 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. |
void |
flushAll()
Delete all all keys from all databases.
|
void |
flushAll(RedisClusterNode node) |
void |
flushDb()
Delete all keys of the currently selected database.
|
void |
flushDb(RedisClusterNode node) |
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. |
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)
|
List<String> |
geoHash(byte[] key,
byte[]... 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. |
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<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.
|
Long |
geoRemove(byte[] key,
byte[]... members)
Remove the members.
|
byte[] |
get(byte[] key)
Get the value of
key. |
Boolean |
getBit(byte[] key,
long offset)
Get the bit value at
offset of value at key. |
List<RedisClientInfo> |
getClientList()
Request information and statistics about connected clients.
|
List<RedisClientInfo> |
getClientList(RedisClusterNode node) |
String |
getClientName()
Returns the name of the current connection.
|
List<String> |
getConfig(RedisClusterNode node,
String pattern) |
List<String> |
getConfig(String pattern)
Load configuration parameters for given
pattern from server. |
redis.clients.jedis.JedisCluster |
getNativeConnection()
Returns the native connection (the underlying library/driver object).
|
byte[] |
getRange(byte[] key,
long begin,
long end)
Get a substring of value of
key between begin and end. |
RedisSentinelConnection |
getSentinelConnection() |
byte[] |
getSet(byte[] key,
byte[] 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. |
Boolean |
hExists(byte[] key,
byte[] field)
Determine if given hash
field exists. |
byte[] |
hGet(byte[] key,
byte[] field)
Get value for given
field from hash at key. |
Map<byte[],byte[]> |
hGetAll(byte[] 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. |
Set<byte[]> |
hKeys(byte[] key)
Get key set (fields) of hash at
key. |
Long |
hLen(byte[] key)
Get size of hash at
key. |
List<byte[]> |
hMGet(byte[] key,
byte[]... 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 |
Cursor<Map.Entry<byte[],byte[]>> |
hScan(byte[] 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 |
hSetNX(byte[] key,
byte[] field,
byte[] value)
Set the
value of a hash field only if field does not exist. |
List<byte[]> |
hVals(byte[] key)
Get entry set (values) of hash at
field. |
Long |
incr(byte[] key)
Increment value of
key by 1. |
Double |
incrBy(byte[] key,
double value)
Increment value of
key by value. |
Long |
incrBy(byte[] key,
long value)
Increment value of
key by value. |
Properties |
info()
Load default server information like
mempory
cpu utilization
replication
See http://redis.io/commands/info
|
Properties |
info(RedisClusterNode node) |
Properties |
info(RedisClusterNode node,
String section) |
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. |
Set<byte[]> |
keys(RedisClusterNode node,
byte[] 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. |
Long |
lastSave(RedisClusterNode node) |
byte[] |
lIndex(byte[] 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 |
lLen(byte[] key)
Get the size of list stored at
key. |
byte[] |
lPop(byte[] key)
Removes and returns first element in list stored at
key. |
Long |
lPush(byte[] key,
byte[]... values)
Prepend
values to key. |
Long |
lPushX(byte[] key,
byte[] value)
Prepend
values to key only if the list exists. |
List<byte[]> |
lRange(byte[] key,
long begin,
long end)
Get elements between
begin 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. |
void |
lSet(byte[] key,
long index,
byte[] value)
Set the
value list element at index. |
void |
lTrim(byte[] key,
long begin,
long end)
Trim list at
key to elements between begin and end. |
List<byte[]> |
mGet(byte[]... keys)
Get the values of all given
keys. |
void |
migrate(byte[] key,
RedisNode target,
int dbIndex,
RedisServerCommands.MigrateOption option) |
void |
migrate(byte[] key,
RedisNode target,
int dbIndex,
RedisServerCommands.MigrateOption option,
long timeout) |
Boolean |
move(byte[] key,
int dbIndex)
Move given
key to database with index. |
void |
mSet(Map<byte[],byte[]> tuples)
Set multiple keys to multiple values using key-value pairs provided in
tuple. |
Boolean |
mSetNX(Map<byte[],byte[]> tuples)
Set multiple keys to multiple values using key-value pairs provided in
tuple only if the provided key does
not exist. |
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 |
pExpire(byte[] 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. |
Long |
pfAdd(byte[] key,
byte[]... 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).
|
void |
pfMerge(byte[] destinationKey,
byte[]... sourceKeys)
Merge N different HyperLogLogs at sourceKeys into a single destinationKey.
|
String |
ping()
Test connection.
|
String |
ping(RedisClusterNode node) |
void |
pSetEx(byte[] key,
long milliseconds,
byte[] 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.
|
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 |
publish(byte[] channel,
byte[] message)
Publishes the given message to the given channel.
|
byte[] |
randomKey()
Return a random key from the keyspace.
|
byte[] |
randomKey(RedisClusterNode node) |
void |
rename(byte[] sourceKey,
byte[] targetKey)
Rename key
oleName to newName. |
Boolean |
renameNX(byte[] sourceKey,
byte[] targetKey)
Rename key
oleName to newName only if newName does not exist. |
void |
resetConfigStats()
Reset statistic counters on server.
|
void |
resetConfigStats(RedisClusterNode node) |
void |
restore(byte[] key,
long ttlInMillis,
byte[] serializedValue)
|
byte[] |
rPop(byte[] key)
Removes and returns last element 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. |
Long |
rPush(byte[] key,
byte[]... values)
Append
values to key. |
Long |
rPushX(byte[] key,
byte[] value)
Append values to
key only if the list exists. |
Long |
sAdd(byte[] key,
byte[]... values)
Add given
values to set at key. |
void |
save()
Synchronous save current db snapshot on server.
|
void |
save(RedisClusterNode node) |
Cursor<byte[]> |
scan(ScanOptions options)
Use a
Cursor to iterate over keys. |
Long |
sCard(byte[] key)
Get size of set at
key. |
List<Boolean> |
scriptExists(String... scriptShas)
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.
|
Set<byte[]> |
sDiff(byte[]... keys)
Diff all sets for given
keys. |
Long |
sDiffStore(byte[] destKey,
byte[]... keys)
Diff all sets for given
keys and store result in destKey
See http://redis.io/commands/sdiffstore |
void |
select(int dbIndex)
Select the DB with given positive
dbIndex. |
void |
set(byte[] key,
byte[] value)
Set
value for key. |
void |
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 |
setBit(byte[] 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 |
setConfig(RedisClusterNode node,
String param,
String value) |
void |
setConfig(String param,
String value)
Set server configuration for
param to value. |
void |
setEx(byte[] key,
long seconds,
byte[] 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. |
void |
setRange(byte[] key,
byte[] value,
long offset)
Overwrite parts of
key starting at the specified offset with given value. |
void |
shutdown()
Shutdown server.
|
void |
shutdown(RedisClusterNode node) |
void |
shutdown(RedisServerCommands.ShutdownOption option)
Shutdown server.
|
Set<byte[]> |
sInter(byte[]... 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. |
Boolean |
sIsMember(byte[] key,
byte[] 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. |
Boolean |
sMove(byte[] srcKey,
byte[] destKey,
byte[] value)
Move
value from srcKey to destKey
See http://redis.io/commands/smove |
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. |
byte[] |
sPop(byte[] key)
Remove and return a random member 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. |
Long |
sRem(byte[] key,
byte[]... 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. |
Long |
strLen(byte[] key)
Get the length of the value stored at
key. |
void |
subscribe(MessageListener listener,
byte[]... channels)
Subscribes the connection to the given channels.
|
Set<byte[]> |
sUnion(byte[]... 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 |
time()
Request server timestamp using
TIME command. |
Long |
time(RedisClusterNode node) |
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. |
DataType |
type(byte[] key)
Determine the type stored at
key. |
void |
unwatch()
Flushes all the previously
#watch(byte[]) keys. |
void |
watch(byte[]... keys)
Watch given
keys for modifications during transaction started with RedisTxCommands.multi(). |
Boolean |
zAdd(byte[] key,
double score,
byte[] value)
Add
value to a sorted set at key, or update its score if it already exists. |
Long |
zAdd(byte[] key,
Set<RedisZSetCommands.Tuple> tuples)
Add
tuples to a sorted set at key, or update its score if it already exists. |
Long |
zCard(byte[] 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. |
Double |
zIncrBy(byte[] key,
double increment,
byte[] value)
Increment the score of element with
value in sorted set by increment. |
Long |
zInterStore(byte[] destKey,
byte[]... sets)
Intersect sorted
sets and store result in destination key. |
Long |
zInterStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
byte[]... sets)
Intersect sorted
sets and store result in destination key. |
Set<byte[]> |
zRange(byte[] key,
long begin,
long end)
Get elements between
begin 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<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
begin 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
begin 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 begin 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<RedisZSetCommands.Tuple> |
zRangeWithScores(byte[] key,
long begin,
long end)
|
Long |
zRank(byte[] key,
byte[] value)
Determine the index of element with
value in a sorted set. |
Long |
zRem(byte[] key,
byte[]... values)
Remove
values from sorted set. |
Long |
zRemRange(byte[] key,
long begin,
long end)
Remove elements in range between
begin and end from sorted set with key. |
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. |
Set<byte[]> |
zRevRange(byte[] key,
long begin,
long end)
Get elements in range from
begin to end from sorted set ordered from high to low. |
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
begin 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<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 begin 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<RedisZSetCommands.Tuple> |
zRevRangeWithScores(byte[] key,
long begin,
long end)
Get set of
RedisZSetCommands.Tuples in range from begin 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. |
Cursor<RedisZSetCommands.Tuple> |
zScan(byte[] 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. |
Long |
zUnionStore(byte[] destKey,
byte[]... sets)
Union sorted
sets and store result in destination key. |
Long |
zUnionStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
byte[]... sets)
Union sorted
sets and store result in destination key. |
public JedisClusterConnection(redis.clients.jedis.JedisCluster cluster)
JedisClusterConnection utilizing native connections via JedisCluster.cluster - must not be null.public JedisClusterConnection(redis.clients.jedis.JedisCluster cluster,
ClusterCommandExecutor executor)
JedisClusterConnection utilizing native connections via JedisCluster running commands
across the cluster via given ClusterCommandExecutor.cluster - must not be null.executor - must not be null.public Object execute(String command, byte[]... args)
RedisCommandsexecute in interface RedisCommandscommand - Command to executeargs - Possible command arguments (may be null)public Long del(byte[]... keys)
RedisKeyCommandskeys.
See http://redis.io/commands/del
del in interface RedisKeyCommandspublic DataType type(byte[] key)
RedisKeyCommandskey.
See http://redis.io/commands/type
type in interface RedisKeyCommandspublic Set<byte[]> keys(byte[] pattern)
RedisKeyCommandspattern.
See http://redis.io/commands/keys
keys in interface RedisKeyCommandspublic Set<byte[]> keys(RedisClusterNode node, byte[] pattern)
keys in interface RedisClusterConnectionnode - must not be null.pattern - must not be null.RedisKeyCommands.keys(byte[])public Cursor<byte[]> scan(ScanOptions options)
RedisKeyCommandsCursor to iterate over keys.
See http://redis.io/commands/scan
scan in interface RedisKeyCommandspublic byte[] randomKey()
RedisKeyCommandsSee http://redis.io/commands/randomkey
randomKey in interface RedisKeyCommandspublic byte[] randomKey(RedisClusterNode node)
randomKey in interface RedisClusterConnectionnode - must not be null.RedisKeyCommands.randomKey()public void rename(byte[] sourceKey,
byte[] targetKey)
RedisKeyCommandsoleName to newName.
See http://redis.io/commands/rename
rename in interface RedisKeyCommandspublic Boolean renameNX(byte[] sourceKey, byte[] targetKey)
RedisKeyCommandsoleName to newName only if newName does not exist.
See http://redis.io/commands/renamenx
renameNX in interface RedisKeyCommandspublic Boolean expire(byte[] key, long seconds)
RedisKeyCommandskey in seconds.
See http://redis.io/commands/expire
expire in interface RedisKeyCommandspublic Boolean pExpire(byte[] key, long millis)
RedisKeyCommandskey in milliseconds.
See http://redis.io/commands/pexpire
pExpire in interface RedisKeyCommandspublic Boolean expireAt(byte[] key, long unixTime)
RedisKeyCommandskey as a UNIX timestamp.
See http://redis.io/commands/expireat
expireAt in interface RedisKeyCommandspublic Boolean pExpireAt(byte[] key, long unixTimeInMillis)
RedisKeyCommandskey as a UNIX timestamp in milliseconds.
See http://redis.io/commands/pexpireat
pExpireAt in interface RedisKeyCommandspublic Boolean persist(byte[] key)
RedisKeyCommandskey.
See http://redis.io/commands/persist
persist in interface RedisKeyCommandspublic Boolean move(byte[] key, int dbIndex)
RedisKeyCommandskey to database with index.
See http://redis.io/commands/move
move in interface RedisKeyCommandspublic Long ttl(byte[] key)
RedisKeyCommandskey in seconds.
See http://redis.io/commands/ttl
ttl in interface RedisKeyCommandspublic Long ttl(byte[] key, TimeUnit timeUnit)
RedisKeyCommandskey in and convert it to the given TimeUnit.
See http://redis.io/commands/ttl
ttl in interface RedisKeyCommandspublic Long pTtl(byte[] key)
RedisKeyCommandskey in milliseconds.
See http://redis.io/commands/pttl
pTtl in interface RedisKeyCommandspublic Long pTtl(byte[] key, TimeUnit timeUnit)
RedisKeyCommandskey in and convert it to the given TimeUnit.
See http://redis.io/commands/pttl
pTtl in interface RedisKeyCommandspublic List<byte[]> sort(byte[] key, SortParameters params)
RedisKeyCommandskey.
See http://redis.io/commands/sort
sort in interface RedisKeyCommandspublic Long sort(byte[] key, SortParameters params, byte[] storeKey)
RedisKeyCommandskey and store result in storeKey.
See http://redis.io/commands/sort
sort in interface RedisKeyCommandspublic byte[] dump(byte[] key)
RedisKeyCommandskey.
See http://redis.io/commands/dump
dump in interface RedisKeyCommandspublic void restore(byte[] key,
long ttlInMillis,
byte[] serializedValue)
RedisKeyCommandskey using the serializedValue, previously obtained using RedisKeyCommands.dump(byte[]).
See http://redis.io/commands/restore
restore in interface RedisKeyCommandspublic byte[] get(byte[] key)
RedisStringCommandskey.
See http://redis.io/commands/get
get in interface RedisStringCommandskey - must not be null.public byte[] getSet(byte[] key,
byte[] value)
RedisStringCommandskey and return its old value.
See http://redis.io/commands/getset
getSet in interface RedisStringCommandskey - must not be null.public List<byte[]> mGet(byte[]... keys)
RedisStringCommandskeys.
See http://redis.io/commands/mget
mGet in interface RedisStringCommandspublic void set(byte[] key,
byte[] value)
RedisStringCommandsvalue for key.
See http://redis.io/commands/set
set in interface RedisStringCommandskey - 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.
See http://redis.io/commands/set
set in interface RedisStringCommandskey - 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 Boolean setNX(byte[] key, byte[] value)
RedisStringCommandsvalue for key, only if key does not exist.
See http://redis.io/commands/setnx
setNX in interface RedisStringCommandskey - must not be null.value - must not be null.public void setEx(byte[] key,
long seconds,
byte[] value)
RedisStringCommandsvalue and expiration in seconds for key.
See http://redis.io/commands/setex
setEx in interface RedisStringCommandskey - 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.
See http://redis.io/commands/psetex
pSetEx in interface RedisStringCommandskey - must not be null.value - must not be null.public void mSet(Map<byte[],byte[]> tuples)
RedisStringCommandstuple.
See http://redis.io/commands/mset
mSet in interface RedisStringCommandspublic Boolean mSetNX(Map<byte[],byte[]> tuples)
RedisStringCommandstuple only if the provided key does
not exist.
See http://redis.io/commands/msetnx
mSetNX in interface RedisStringCommandspublic Long incr(byte[] key)
RedisStringCommandskey by 1.
See http://redis.io/commands/incr
incr in interface RedisStringCommandskey - must not be null.public Long incrBy(byte[] key, long value)
RedisStringCommandskey by value.
See http://redis.io/commands/incrby
incrBy in interface RedisStringCommandskey - must not be null.public Double incrBy(byte[] key, double value)
RedisStringCommandskey by value.
See http://redis.io/commands/incrbyfloat
incrBy in interface RedisStringCommandskey - must not be null.public Long decr(byte[] key)
RedisStringCommandskey by 1.
See http://redis.io/commands/decr
decr in interface RedisStringCommandskey - must not be null.public Long decrBy(byte[] key, long value)
RedisStringCommandskey by value.
See http://redis.io/commands/decrby
decrBy in interface RedisStringCommandskey - must not be null.public Long append(byte[] key, byte[] value)
RedisStringCommandsvalue to key.
See http://redis.io/commands/append
append in interface RedisStringCommandskey - must not be null.public byte[] getRange(byte[] key,
long begin,
long end)
RedisStringCommandskey between begin and end.
See http://redis.io/commands/getrange
getRange in interface RedisStringCommandskey - must not be null.public void setRange(byte[] key,
byte[] value,
long offset)
RedisStringCommandskey starting at the specified offset with given value.
See http://redis.io/commands/setrange
setRange in interface RedisStringCommandskey - must not be null.public Boolean getBit(byte[] key, long offset)
RedisStringCommandsoffset of value at key.
See http://redis.io/commands/getbit
getBit in interface RedisStringCommandskey - must not be null.public Boolean setBit(byte[] key, long offset, boolean value)
RedisStringCommandsoffset in value stored at key.
See http://redis.io/commands/setbit
setBit in interface RedisStringCommandskey - must not be null.offset.public Long bitCount(byte[] key)
RedisStringCommandskey.
See http://redis.io/commands/bitcount
bitCount in interface RedisStringCommandskey - must not be null.public Long bitCount(byte[] key, long begin, long end)
RedisStringCommandskey between begin and
end.
See http://redis.io/commands/bitcount
bitCount in interface RedisStringCommandskey - must not be null.public Long bitOp(RedisStringCommands.BitOperation op, byte[] destination, byte[]... keys)
RedisStringCommandsSee http://redis.io/commands/bitop
bitOp in interface RedisStringCommandspublic Long strLen(byte[] key)
RedisStringCommandskey.
See http://redis.io/commands/strlen
strLen in interface RedisStringCommandskey - must not be null.public Long rPush(byte[] key, byte[]... values)
RedisListCommandsvalues to key.
See http://redis.io/commands/rpush
rPush in interface RedisListCommandspublic Long lPush(byte[] key, byte[]... values)
RedisListCommandsvalues to key.
See http://redis.io/commands/lpush
lPush in interface RedisListCommandspublic Long rPushX(byte[] key, byte[] value)
RedisListCommandskey only if the list exists.
See http://redis.io/commands/rpushx
rPushX in interface RedisListCommandspublic Long lPushX(byte[] key, byte[] value)
RedisListCommandsvalues to key only if the list exists.
See http://redis.io/commands/lpushx
lPushX in interface RedisListCommandspublic Long lLen(byte[] key)
RedisListCommandskey.
See http://redis.io/commands/llen
lLen in interface RedisListCommandspublic List<byte[]> lRange(byte[] key, long begin, long end)
RedisListCommandsbegin and end from list at key.
See http://redis.io/commands/lrange
lRange in interface RedisListCommandspublic void lTrim(byte[] key,
long begin,
long end)
RedisListCommandskey to elements between begin and end.
See http://redis.io/commands/ltrim
lTrim in interface RedisListCommandspublic byte[] lIndex(byte[] key,
long index)
RedisListCommandsindex form list at key.
See http://redis.io/commands/lindex
lIndex in interface RedisListCommandspublic Long lInsert(byte[] key, RedisListCommands.Position where, byte[] pivot, byte[] value)
RedisListCommandsvalue RedisListCommands.Position.BEFORE or RedisListCommands.Position.AFTER existing pivot for key.
See http://redis.io/commands/linsert
lInsert in interface RedisListCommandspublic void lSet(byte[] key,
long index,
byte[] value)
RedisListCommandsvalue list element at index.
See http://redis.io/commands/lset
lSet in interface RedisListCommandspublic Long lRem(byte[] key, long count, byte[] value)
RedisListCommandscount occurrences of value from the list stored at key.
See http://redis.io/commands/lrem
lRem in interface RedisListCommandspublic byte[] lPop(byte[] key)
RedisListCommandskey.
See http://redis.io/commands/lpop
lPop in interface RedisListCommandspublic byte[] rPop(byte[] key)
RedisListCommandskey.
See http://redis.io/commands/rpop
rPop in interface RedisListCommandspublic List<byte[]> bLPop(int timeout, byte[]... keys)
RedisListCommandskeys (see: RedisListCommands.lPop(byte[])). timeout reached.
See http://redis.io/commands/blpop
bLPop in interface RedisListCommandspublic List<byte[]> bRPop(int timeout, byte[]... keys)
RedisListCommandskeys (see: RedisListCommands.rPop(byte[])). timeout reached.
See http://redis.io/commands/brpop
bRPop in interface RedisListCommandspublic byte[] rPopLPush(byte[] srcKey,
byte[] dstKey)
RedisListCommandssrcKey, append it to dstKey and return its value.
See http://redis.io/commands/rpoplpush
rPopLPush in interface RedisListCommandspublic byte[] bRPopLPush(int timeout,
byte[] srcKey,
byte[] dstKey)
RedisListCommandssrcKey, append it to dstKey and return its value (see
RedisListCommands.rPopLPush(byte[], byte[])). timeout reached.
See http://redis.io/commands/brpoplpush
bRPopLPush in interface RedisListCommandspublic Long sAdd(byte[] key, byte[]... values)
RedisSetCommandsvalues to set at key.
See http://redis.io/commands/sadd
sAdd in interface RedisSetCommandspublic Long sRem(byte[] key, byte[]... values)
RedisSetCommandsvalues from set at key and return the number of removed elements.
See http://redis.io/commands/srem
sRem in interface RedisSetCommandspublic byte[] sPop(byte[] key)
RedisSetCommandskey.
See http://redis.io/commands/spop
sPop in interface RedisSetCommandspublic Boolean sMove(byte[] srcKey, byte[] destKey, byte[] value)
RedisSetCommandsvalue from srcKey to destKey
See http://redis.io/commands/smove
sMove in interface RedisSetCommandspublic Long sCard(byte[] key)
RedisSetCommandskey.
See http://redis.io/commands/scard
sCard in interface RedisSetCommandspublic Boolean sIsMember(byte[] key, byte[] value)
RedisSetCommandskey contains value.
See http://redis.io/commands/sismember
sIsMember in interface RedisSetCommandspublic Set<byte[]> sInter(byte[]... keys)
RedisSetCommandskeys.
See http://redis.io/commands/sinter
sInter in interface RedisSetCommandspublic Long sInterStore(byte[] destKey, byte[]... keys)
RedisSetCommandskeys and store result in destKey.
See http://redis.io/commands/sinterstore
sInterStore in interface RedisSetCommandspublic Set<byte[]> sUnion(byte[]... keys)
RedisSetCommandskeys.
See http://redis.io/commands/sunion
sUnion in interface RedisSetCommandspublic Long sUnionStore(byte[] destKey, byte[]... keys)
RedisSetCommandskeys and store result in destKey.
See http://redis.io/commands/sunionstore
sUnionStore in interface RedisSetCommandspublic Set<byte[]> sDiff(byte[]... keys)
RedisSetCommandskeys.
See http://redis.io/commands/sdiff
sDiff in interface RedisSetCommandspublic Long sDiffStore(byte[] destKey, byte[]... keys)
RedisSetCommandskeys and store result in destKey
See http://redis.io/commands/sdiffstore
sDiffStore in interface RedisSetCommandspublic Set<byte[]> sMembers(byte[] key)
RedisSetCommandskey.
See http://redis.io/commands/smembers
sMembers in interface RedisSetCommandspublic byte[] sRandMember(byte[] key)
RedisSetCommandskey.
See http://redis.io/commands/srandmember
sRandMember in interface RedisSetCommandspublic List<byte[]> sRandMember(byte[] key, long count)
RedisSetCommandscount random elements from set at key.
See http://redis.io/commands/srandmember
sRandMember in interface RedisSetCommandspublic Cursor<byte[]> sScan(byte[] key, ScanOptions options)
RedisSetCommandssScan in interface RedisSetCommandspublic Boolean zAdd(byte[] key, double score, byte[] value)
RedisZSetCommandsvalue to a sorted set at key, or update its score if it already exists.
See http://redis.io/commands/zadd
zAdd in interface RedisZSetCommandspublic Long zAdd(byte[] key, Set<RedisZSetCommands.Tuple> tuples)
RedisZSetCommandstuples to a sorted set at key, or update its score if it already exists.
See http://redis.io/commands/zadd
zAdd in interface RedisZSetCommandspublic Long zRem(byte[] key, byte[]... values)
RedisZSetCommandsvalues from sorted set. Return number of removed elements.
See http://redis.io/commands/zrem
zRem in interface RedisZSetCommandspublic Double zIncrBy(byte[] key, double increment, byte[] value)
RedisZSetCommandsvalue in sorted set by increment.
See http://redis.io/commands/zincrby
zIncrBy in interface RedisZSetCommandspublic Long zRank(byte[] key, byte[] value)
RedisZSetCommandsvalue in a sorted set.
See http://redis.io/commands/zrank
zRank in interface RedisZSetCommandspublic Long zRevRank(byte[] key, byte[] value)
RedisZSetCommandsvalue in a sorted set when scored high to low.
See http://redis.io/commands/zrevrank
zRevRank in interface RedisZSetCommandspublic Set<byte[]> zRange(byte[] key, long begin, long end)
RedisZSetCommandsbegin and end from sorted set.
See http://redis.io/commands/zrange
zRange in interface RedisZSetCommandspublic Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandszRangeByScoreWithScores in interface RedisZSetCommandspublic 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 RedisZSetCommandspublic Set<byte[]> zRevRangeByScore(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandsRange#min and Range#max from sorted set ordered from high to
low.zRevRangeByScore in interface RedisZSetCommandspublic 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 RedisZSetCommandspublic 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 RedisZSetCommandspublic 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 RedisZSetCommandspublic Long zCount(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandsRange#min and Range#max.zCount in interface RedisZSetCommandspublic Long zRemRangeByScore(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandsRange#min and Range#max from sorted set with key.zRemRangeByScore in interface RedisZSetCommandspublic Set<byte[]> zRangeByScore(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommandsRange#min and Range#max from sorted set.zRangeByScore in interface RedisZSetCommandspublic 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 RedisZSetCommandspublic 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.public Set<RedisZSetCommands.Tuple> zRangeWithScores(byte[] key, long begin, long end)
RedisZSetCommandsRedisZSetCommands.Tuples between begin and end from sorted set.
See http://redis.io/commands/zrange
zRangeWithScores in interface RedisZSetCommandspublic Set<byte[]> zRangeByScore(byte[] key, double min, double max)
RedisZSetCommandsmin and max from sorted set.
See http://redis.io/commands/zrangebyscore
zRangeByScore in interface RedisZSetCommandspublic Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key, double min, double max)
RedisZSetCommandsRedisZSetCommands.Tuples where score is between min and max from sorted set.
See http://redis.io/commands/zrangebyscore
zRangeByScoreWithScores in interface RedisZSetCommandspublic Set<byte[]> zRangeByScore(byte[] key, double min, double max, long offset, long count)
RedisZSetCommandsbegin to end where score is between min and max from
sorted set.
See http://redis.io/commands/zrangebyscore
zRangeByScore in interface RedisZSetCommandspublic Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count)
RedisZSetCommandsRedisZSetCommands.Tuples in range from begin to end where score is between min and
max from sorted set.
See http://redis.io/commands/zrangebyscore
zRangeByScoreWithScores in interface RedisZSetCommandspublic Set<byte[]> zRevRange(byte[] key, long begin, long end)
RedisZSetCommandsbegin to end from sorted set ordered from high to low.
See http://redis.io/commands/zrevrange
zRevRange in interface RedisZSetCommandspublic Set<RedisZSetCommands.Tuple> zRevRangeWithScores(byte[] key, long begin, long end)
RedisZSetCommandsRedisZSetCommands.Tuples in range from begin to end from sorted set ordered from high to low.
See http://redis.io/commands/zrevrange
zRevRangeWithScores in interface RedisZSetCommandspublic Set<byte[]> zRevRangeByScore(byte[] key, double min, double max)
RedisZSetCommandsmin and max from sorted set ordered from high to low.
See http://redis.io/commands/zrevrange
zRevRangeByScore in interface RedisZSetCommandspublic 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.
See http://redis.io/commands/zrevrange
zRevRangeByScoreWithScores in interface RedisZSetCommandspublic Set<byte[]> zRevRangeByScore(byte[] key, double min, double max, long offset, long count)
RedisZSetCommandsbegin to end where score is between min and max from
sorted set ordered high -> low.
See http://redis.io/commands/zrevrangebyscore
zRevRangeByScore in interface RedisZSetCommandspublic Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count)
RedisZSetCommandsRedisZSetCommands.Tuple in range from begin to end where score is between min and
max from sorted set ordered high -> low.
See http://redis.io/commands/zrevrangebyscore
zRevRangeByScoreWithScores in interface RedisZSetCommandspublic Long zCount(byte[] key, double min, double max)
RedisZSetCommandsmin and max.
See http://redis.io/commands/zcount
zCount in interface RedisZSetCommandspublic Long zCard(byte[] key)
RedisZSetCommandskey.
See http://redis.io/commands/zcard
zCard in interface RedisZSetCommandspublic Double zScore(byte[] key, byte[] value)
RedisZSetCommandsvalue from sorted set with key key.
See http://redis.io/commands/zrem
zScore in interface RedisZSetCommandspublic Long zRemRange(byte[] key, long begin, long end)
RedisZSetCommandsbegin and end from sorted set with key.
See http://redis.io/commands/zremrange
zRemRange in interface RedisZSetCommandspublic Long zRemRangeByScore(byte[] key, double min, double max)
RedisZSetCommandsmin and max from sorted set with key.
See http://redis.io/commands/zremrangebyscore
zRemRangeByScore in interface RedisZSetCommandspublic Long zUnionStore(byte[] destKey, byte[]... sets)
RedisZSetCommandssets and store result in destination key.
See http://redis.io/commands/zunionstore
zUnionStore in interface RedisZSetCommandspublic Long zUnionStore(byte[] destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, byte[]... sets)
RedisZSetCommandssets and store result in destination key.
See http://redis.io/commands/zunionstore
zUnionStore in interface RedisZSetCommandspublic Long zInterStore(byte[] destKey, byte[]... sets)
RedisZSetCommandssets and store result in destination key.
See http://redis.io/commands/zinterstore
zInterStore in interface RedisZSetCommandspublic Long zInterStore(byte[] destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, byte[]... sets)
RedisZSetCommandssets and store result in destination key.
See http://redis.io/commands/zinterstore
zInterStore in interface RedisZSetCommandspublic Cursor<RedisZSetCommands.Tuple> zScan(byte[] key, ScanOptions options)
RedisZSetCommandszScan in interface RedisZSetCommandspublic Set<byte[]> zRangeByScore(byte[] key, String min, String max)
RedisZSetCommandsmin and max from sorted set.
See http://redis.io/commands/zrangebyscore
zRangeByScore in interface RedisZSetCommandspublic Set<byte[]> zRangeByScore(byte[] key, String min, String max, long offset, long count)
RedisZSetCommandsbegin to end where score is between min and max from
sorted set.
See http://redis.io/commands/zrangebyscore
zRangeByScore in interface RedisZSetCommandspublic Boolean hSet(byte[] key, byte[] field, byte[] value)
RedisHashCommandsvalue of a hash field.hSet in interface RedisHashCommandshttp://redis.io/commands/hsetpublic Boolean hSetNX(byte[] key, byte[] field, byte[] value)
RedisHashCommandsvalue of a hash field only if field does not exist.hSetNX in interface RedisHashCommandshttp://redis.io/commands/hsetnxpublic byte[] hGet(byte[] key,
byte[] field)
RedisHashCommandsfield from hash at key.hGet in interface RedisHashCommandshttp://redis.io/commands/hgetpublic List<byte[]> hMGet(byte[] key, byte[]... fields)
RedisHashCommandsfields from hash at key.hMGet in interface RedisHashCommandshttp://redis.io/commands/hmgetpublic void hMSet(byte[] key,
Map<byte[],byte[]> hashes)
RedisHashCommandshasheshMSet in interface RedisHashCommandshttp://redis.io/commands/hmsetpublic Long hIncrBy(byte[] key, byte[] field, long delta)
RedisHashCommandsvalue of a hash field by the given delta.hIncrBy in interface RedisHashCommandshttp://redis.io/commands/hincrbypublic Double hIncrBy(byte[] key, byte[] field, double delta)
RedisHashCommandsvalue of a hash field by the given delta.hIncrBy in interface RedisHashCommandshttp://redis.io/commands/hincrbyfloatpublic Boolean hExists(byte[] key, byte[] field)
RedisHashCommandsfield exists.hExists in interface RedisHashCommandshttp://redis.io/commands/hexitspublic Long hDel(byte[] key, byte[]... fields)
RedisHashCommandsfields.hDel in interface RedisHashCommandshttp://redis.io/commands/hdelpublic Long hLen(byte[] key)
RedisHashCommandskey.hLen in interface RedisHashCommandshttp://redis.io/commands/hlenpublic Set<byte[]> hKeys(byte[] key)
RedisHashCommandskey.hKeys in interface RedisHashCommandshttp://redis.io/commands/h?public List<byte[]> hVals(byte[] key)
RedisHashCommandsfield.hVals in interface RedisHashCommandshttp://redis.io/commands/hvalspublic Map<byte[],byte[]> hGetAll(byte[] key)
RedisHashCommandskey.hGetAll in interface RedisHashCommandshttp://redis.io/commands/hgetallpublic Cursor<Map.Entry<byte[],byte[]>> hScan(byte[] key, ScanOptions options)
RedisHashCommandsCursor to iterate over entries in hash at key.hScan in interface RedisHashCommandshttp://redis.io/commands/scanpublic void multi()
RedisTxCommandsRedisTxCommands.exec() or rolled back using RedisTxCommands.discard()
See http://redis.io/commands/multi
multi in interface RedisTxCommandspublic List<Object> exec()
RedisTxCommandsRedisTxCommands.multi(). #watch(byte[]) the operation will fail if any of watched keys has been modified.
See http://redis.io/commands/exec
exec in interface RedisTxCommandspublic void discard()
RedisTxCommandsRedisTxCommands.multi().
See http://redis.io/commands/discard
discard in interface RedisTxCommandspublic void watch(byte[]... keys)
RedisTxCommandskeys for modifications during transaction started with RedisTxCommands.multi().
See http://redis.io/commands/watch
watch in interface RedisTxCommandspublic void unwatch()
RedisTxCommands#watch(byte[]) keys.
See http://redis.io/commands/unwatch
unwatch in interface RedisTxCommandspublic boolean isSubscribed()
RedisPubSubCommandsisSubscribed in interface RedisPubSubCommandspublic Subscription getSubscription()
RedisPubSubCommandsgetSubscription in interface RedisPubSubCommandspublic Long publish(byte[] channel, byte[] message)
RedisPubSubCommandspublish in interface RedisPubSubCommandschannel - the channel to publish tomessage - 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.
subscribe in interface RedisPubSubCommandslistener - message listenerchannels - channel namespublic 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 listenerpatterns - channel name patternspublic 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(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 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(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 List<String> geoHash(byte[] key, byte[]... members)
RedisGeoCommandsgeoHash in interface 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.geoPos in interface RedisGeoCommandskey - must not be null.members - must not be null.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 void select(int dbIndex)
RedisConnectionCommandsdbIndex.
See http://redis.io/commands/select
select in interface RedisConnectionCommandspublic byte[] echo(byte[] message)
RedisConnectionCommandsmessage via server roundtrip.
See http://redis.io/commands/echo
echo in interface RedisConnectionCommandspublic String ping()
RedisConnectionCommandsSee http://redis.io/commands/ping
ping in interface RedisConnectionCommandspublic String ping(RedisClusterNode node)
ping in interface RedisClusterConnectionnode - must not be null.RedisConnectionCommands.ping()public void bgWriteAof()
RedisServerCommandsSee http://redis.io/commands/bgrewriteaof
bgWriteAof in interface RedisServerCommandspublic void bgReWriteAof(RedisClusterNode node)
bgReWriteAof in interface RedisClusterConnectionnode - must not be null.RedisServerCommands.bgReWriteAof()public void bgReWriteAof()
RedisServerCommandsSee http://redis.io/commands/bgrewriteaof
bgReWriteAof in interface RedisServerCommandspublic void bgSave()
RedisServerCommandsSee http://redis.io/commands/bgsave
bgSave in interface RedisServerCommandspublic void bgSave(RedisClusterNode node)
bgSave in interface RedisClusterConnectionnode - must not be null.RedisServerCommands.bgSave()public Long lastSave()
RedisServerCommandsRedisServerCommands.bgSave() operation in seconds.
See http://redis.io/commands/lastsave
lastSave in interface RedisServerCommandspublic Long lastSave(RedisClusterNode node)
lastSave in interface RedisClusterConnectionnode - must not be null.RedisServerCommands.lastSave()public void save()
RedisServerCommandsSee http://redis.io/commands/save
save in interface RedisServerCommandspublic void save(RedisClusterNode node)
save in interface RedisClusterConnectionnode - must not be null.RedisServerCommands.save()public Long dbSize()
RedisServerCommandsSee http://redis.io/commands/dbsize
dbSize in interface RedisServerCommandspublic Long dbSize(RedisClusterNode node)
dbSize in interface RedisClusterConnectionnode - must not be null.RedisServerCommands.dbSize()public void flushDb()
RedisServerCommandsSee http://redis.io/commands/flushdb
flushDb in interface RedisServerCommandspublic void flushDb(RedisClusterNode node)
flushDb in interface RedisClusterConnectionnode - must not be null.RedisServerCommands.flushDb()public void flushAll()
RedisServerCommandsSee http://redis.io/commands/flushall
flushAll in interface RedisServerCommandspublic void flushAll(RedisClusterNode node)
flushAll in interface RedisClusterConnectionnode - must not be null.RedisServerCommands.flushAll()public Properties info()
RedisServerCommandsSee http://redis.io/commands/info
info in interface RedisServerCommandspublic Properties info(RedisClusterNode node)
info in interface RedisClusterConnectionnode - must not be null.RedisServerCommands.info()public Properties info(String section)
RedisServerCommandsselection.
See http://redis.io/commands/info
info in interface RedisServerCommandspublic Properties info(RedisClusterNode node, String section)
info in interface RedisClusterConnectionnode - must not be null.RedisServerCommands.info(String)public void shutdown()
RedisServerCommandsSee http://redis.io/commands/shutdown
shutdown in interface RedisServerCommandspublic void shutdown(RedisClusterNode node)
shutdown in interface RedisClusterConnectionnode - must not be null.RedisServerCommands.shutdown()public void shutdown(RedisServerCommands.ShutdownOption option)
RedisServerCommandsSee http://redis.io/commands/shutdown
shutdown in interface RedisServerCommandspublic List<String> getConfig(String pattern)
RedisServerCommandspattern from server.
See http://redis.io/commands/config-get
getConfig in interface RedisServerCommandspublic List<String> getConfig(RedisClusterNode node, String pattern)
getConfig in interface RedisClusterConnectionnode - must not be null.RedisServerCommands.getConfig(String)public void setConfig(String param, String value)
RedisServerCommandsparam to value.
See http://redis.io/commands/config-set
setConfig in interface RedisServerCommandspublic void setConfig(RedisClusterNode node, String param, String value)
setConfig in interface RedisClusterConnectionnode - must not be null.RedisServerCommands.setConfig(String, String)public void resetConfigStats()
RedisServerCommandsRedisServerCommands.info().
See http://redis.io/commands/config-resetstat
resetConfigStats in interface RedisServerCommandspublic void resetConfigStats(RedisClusterNode node)
resetConfigStats in interface RedisClusterConnectionnode - must not be null.RedisServerCommands.resetConfigStats()public Long time()
RedisServerCommandsTIME command.time in interface RedisServerCommandspublic Long time(RedisClusterNode node)
time in interface RedisClusterConnectionnode - must not be null.RedisServerCommands.time()public void killClient(String host, int port)
RedisServerCommandskillClient in interface RedisServerCommandshost - of connection to close.port - of connection to closepublic void setClientName(byte[] name)
RedisServerCommandssetClientName in interface RedisServerCommandspublic String getClientName()
RedisServerCommandsSee http://redis.io/commands/client-getname
getClientName in interface RedisServerCommandspublic List<RedisClientInfo> getClientList()
RedisServerCommandsSee http://redis.io/commands/client-list
getClientList in interface RedisServerCommandsList of RedisClientInfo objects.public List<RedisClientInfo> getClientList(RedisClusterNode node)
getClientList in interface RedisClusterConnectionnode - must not be null.RedisServerCommands.getClientList()public void slaveOf(String host, int port)
RedisServerCommandsSee http://redis.io/commands/slaveof
slaveOf in interface RedisServerCommandspublic void slaveOfNoOne()
RedisServerCommandsSee http://redis.io/commands/slaveof
slaveOfNoOne in interface RedisServerCommandspublic void scriptFlush()
RedisScriptingCommandsSee http://redis.io/commands/script-flush
scriptFlush in interface RedisScriptingCommandspublic void scriptKill()
RedisScriptingCommandsSee http://redis.io/commands/script-kill
scriptKill in interface RedisScriptingCommandspublic String scriptLoad(byte[] script)
RedisScriptingCommands#evalSha(String, ReturnType, int, byte[]).
See http://redis.io/commands/script-load
scriptLoad in interface RedisScriptingCommandspublic List<Boolean> scriptExists(String... scriptShas)
RedisScriptingCommandsscriptShas exist in script cache.
See http://redis.io/commands/script-exits
scriptExists in interface RedisScriptingCommandspublic <T> T eval(byte[] script,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
RedisScriptingCommandsscript.
See http://redis.io/commands/eval
eval in interface RedisScriptingCommandspublic <T> T evalSha(String scriptSha, ReturnType returnType, int numKeys, byte[]... keysAndArgs)
RedisScriptingCommandsscriptSha.
See http://redis.io/commands/evalsha
evalSha in interface RedisScriptingCommandspublic <T> T evalSha(byte[] scriptSha,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
RedisScriptingCommandsscriptSha.
See http://redis.io/commands/evalsha
evalSha in interface RedisScriptingCommandspublic Long pfAdd(byte[] key, byte[]... values)
HyperLogLogCommandspfAdd in interface HyperLogLogCommandspublic Long pfCount(byte[]... keys)
HyperLogLogCommandspfCount in interface HyperLogLogCommandspublic void pfMerge(byte[] destinationKey,
byte[]... sourceKeys)
HyperLogLogCommandspfMerge in interface HyperLogLogCommandspublic Boolean exists(byte[] key)
RedisKeyCommandskey exists.
See http://redis.io/commands/exists
exists in interface RedisKeyCommandspublic void clusterSetSlot(RedisClusterNode node, int slot, RedisClusterCommands.AddSlots mode)
clusterSetSlot in interface RedisClusterCommandsnode - must not be null.mode - must not benull.public List<byte[]> clusterGetKeysInSlot(int slot, Integer count)
RedisClusterCommandsclusterGetKeysInSlot in interface RedisClusterCommandscount - must not be null.public void clusterAddSlots(RedisClusterNode node, int... slots)
RedisClusterCommandsRedisClusterNode.clusterAddSlots in interface RedisClusterCommandsnode - must not be null.public void clusterAddSlots(RedisClusterNode node, RedisClusterNode.SlotRange range)
RedisClusterCommandsRedisClusterNode.SlotRange.getSlotsArray() to given RedisClusterNode.clusterAddSlots in interface RedisClusterCommandsnode - must not be null.range - must not be null.public Long clusterCountKeysInSlot(int slot)
RedisClusterCommandsclusterCountKeysInSlot in interface RedisClusterCommandspublic void clusterDeleteSlots(RedisClusterNode node, int... slots)
RedisClusterCommandsRedisClusterNode.clusterDeleteSlots in interface RedisClusterCommandsnode - must not be null.public void clusterDeleteSlotsInRange(RedisClusterNode node, RedisClusterNode.SlotRange range)
RedisClusterCommandsRedisClusterNode.SlotRange.getSlotsArray() from given RedisClusterNode.clusterDeleteSlotsInRange in interface RedisClusterCommandsnode - must not be null.range - must not be null.public void clusterForget(RedisClusterNode node)
RedisClusterCommandsclusterForget in interface RedisClusterCommandsnode - must not be null.public void clusterMeet(RedisClusterNode node)
RedisClusterCommandsclusterMeet in interface RedisClusterCommandsnode - must contain host and RedisNode.getPort() and must
not be null.public void clusterReplicate(RedisClusterNode master, RedisClusterNode slave)
RedisClusterCommandsclusterReplicate in interface RedisClusterCommandsmaster - must not be null.slave - must not be null.public Integer clusterGetSlotForKey(byte[] key)
RedisClusterCommandskey.clusterGetSlotForKey in interface RedisClusterCommandskey - must not be null.public RedisClusterNode clusterGetNodeForSlot(int slot)
RedisClusterCommandsRedisClusterNode serving given slot.clusterGetNodeForSlot in interface RedisClusterCommandspublic Set<RedisClusterNode> clusterGetNodes()
RedisClusterCommandsclusterGetNodes in interface RedisClusterCommandspublic Set<RedisClusterNode> clusterGetSlaves(RedisClusterNode master)
RedisClusterCommandsclusterGetSlaves in interface RedisClusterCommandsmaster - must not be null.public Map<RedisClusterNode,Collection<RedisClusterNode>> clusterGetMasterSlaveMap()
RedisClusterCommandsclusterGetMasterSlaveMap in interface RedisClusterCommandspublic RedisClusterNode clusterGetNodeForKey(byte[] key)
RedisClusterCommandsRedisClusterNode serving given key.clusterGetNodeForKey in interface RedisClusterCommandskey - must not be null.public ClusterInfo clusterGetClusterInfo()
RedisClusterCommandsclusterGetClusterInfo in interface RedisClusterCommandspublic void migrate(byte[] key,
RedisNode target,
int dbIndex,
RedisServerCommands.MigrateOption option)
migrate 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,
RedisServerCommands.MigrateOption option,
long timeout)
migrate in interface RedisServerCommandskey - must not be null.target - must not be null.option - can be null. Defaulted to RedisServerCommands.MigrateOption.COPY.protected DataAccessException convertJedisAccessException(Exception ex)
public void close()
throws DataAccessException
RedisConnectionclose in interface RedisConnectionDataAccessExceptionpublic boolean isClosed()
RedisConnectionisClosed in interface RedisConnectionpublic redis.clients.jedis.JedisCluster getNativeConnection()
RedisConnectiongetNativeConnection in interface RedisConnectionpublic boolean isQueueing()
RedisConnectionisQueueing 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 List<Object> closePipeline() throws RedisPipelineException
RedisConnectionclosePipeline in interface RedisConnectionRedisPipelineException - if the pipeline contains any incorrect/invalid statementspublic RedisSentinelConnection getSentinelConnection()
getSentinelConnection in interface RedisConnectionCopyright © 2011-2016–2016 Pivotal Software, Inc.. All rights reserved.