|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.data.redis.connection.DefaultStringRedisConnection
public class DefaultStringRedisConnection
Default implementation of StringRedisConnection.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.springframework.data.redis.connection.StringRedisConnection |
|---|
StringRedisConnection.StringTuple |
| Nested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisStringCommands |
|---|
RedisStringCommands.BitOperation |
| Nested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisListCommands |
|---|
RedisListCommands.Position |
| Nested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisZSetCommands |
|---|
RedisZSetCommands.Aggregate, RedisZSetCommands.Tuple |
| Nested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisServerCommands |
|---|
RedisServerCommands.ShutdownOption |
| Constructor Summary | |
|---|---|
DefaultStringRedisConnection(RedisConnection connection)
Constructs a new DefaultStringRedisConnection instance. |
|
DefaultStringRedisConnection(RedisConnection connection,
RedisSerializer<String> serializer)
Constructs a new DefaultStringRedisConnection instance. |
|
| Method Summary | ||
|---|---|---|
Long |
append(byte[] key,
byte[] value)
Append a value to key. |
|
Long |
append(String key,
String value)
|
|
void |
bgReWriteAof()
Start an Append Only File rewrite process on server. |
|
void |
bgSave()
Start background saving of db on server. |
|
void |
bgWriteAof()
Deprecated. As of 1.3, use bgReWriteAof(). |
|
Long |
bitCount(byte[] key)
Count the number of set bits (population counting) in value stored at key. |
|
Long |
bitCount(byte[] key,
long begin,
long end)
Count the number of set bits (population counting) of value stored at key between begin and
end. |
|
Long |
bitCount(String key)
|
|
Long |
bitCount(String key,
long begin,
long end)
|
|
Long |
bitOp(RedisStringCommands.BitOperation op,
byte[] destination,
byte[]... keys)
Perform bitwise operations between strings. |
|
Long |
bitOp(RedisStringCommands.BitOperation op,
String destination,
String... keys)
|
|
List<byte[]> |
bLPop(int timeout,
byte[]... keys)
Removes and returns first element from lists stored at keys (see: RedisListCommands.lPop(byte[])). |
|
List<String> |
bLPop(int timeout,
String... keys)
|
|
List<byte[]> |
bRPop(int timeout,
byte[]... keys)
Removes and returns last element from lists stored at keys (see: RedisListCommands.rPop(byte[])). |
|
List<String> |
bRPop(int timeout,
String... keys)
|
|
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[])). |
|
String |
bRPopLPush(int timeout,
String srcKey,
String dstKey)
|
|
void |
close()
Closes (or quits) the connection. |
|
List<Object> |
closePipeline()
Executes the commands in the pipeline and returns their result. |
|
Long |
dbSize()
Get the total number of available keys in currently selected database. |
|
Long |
decr(byte[] key)
Decrement value of key by 1. |
|
Long |
decr(String key)
|
|
Long |
decrBy(byte[] key,
long value)
Increment value of key by value. |
|
Long |
decrBy(String key,
long value)
|
|
Long |
del(byte[]... keys)
Delete given keys. |
|
Long |
del(String... keys)
|
|
void |
discard()
Discard all commands issued after RedisTxCommands.multi(). |
|
byte[] |
dump(byte[] key)
Retrieve serialized version of the value stored at key. |
|
byte[] |
echo(byte[] message)
Returns message via server roundtrip. |
|
String |
echo(String message)
|
|
|
eval(byte[] script,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
Evaluate given script. |
|
|
eval(String script,
ReturnType returnType,
int numKeys,
String... keysAndArgs)
NOTE: This method will not deserialize Strings returned by Lua scripts, as they may not be encoded with the same serializer used here. |
|
|
evalSha(String scriptSha1,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
Evaluate given scriptSha. |
|
|
evalSha(String scriptSha1,
ReturnType returnType,
int numKeys,
String... keysAndArgs)
NOTE: This method will not deserialize Strings returned by Lua scripts, as they may not be encoded with the same serializer used here. |
|
List<Object> |
exec()
Executes all queued commands in a transaction started with RedisTxCommands.multi(). |
|
Object |
execute(String command)
|
|
Object |
execute(String command,
byte[]... args)
'Native' or 'raw' execution of the given command along-side the given arguments. |
|
Object |
execute(String command,
String... args)
|
|
Boolean |
exists(byte[] key)
Determine if given key exists. |
|
Boolean |
exists(String key)
|
|
Boolean |
expire(byte[] key,
long seconds)
Set time to live for given key in seconds. |
|
Boolean |
expire(String key,
long seconds)
|
|
Boolean |
expireAt(byte[] key,
long unixTime)
Set the expiration for given key as a UNIX timestamp. |
|
Boolean |
expireAt(String key,
long unixTime)
|
|
void |
flushAll()
Delete all all keys from all databases. |
|
void |
flushDb()
Delete all keys of the currently selected database. |
|
byte[] |
get(byte[] key)
Get the value of key. |
|
String |
get(String key)
|
|
Boolean |
getBit(byte[] key,
long offset)
Get the bit value at offset of value at key. |
|
Boolean |
getBit(String key,
long offset)
|
|
List<RedisClientInfo> |
getClientList()
Request information and statistics about connected clients. |
|
String |
getClientName()
Returns the name of the current connection. |
|
List<String> |
getConfig(String pattern)
Load configuration parameters for given pattern from server. |
|
Object |
getNativeConnection()
Returns the native connection (the underlying library/driver object). |
|
byte[] |
getRange(byte[] key,
long start,
long end)
Get a substring of value of key between begin and end. |
|
String |
getRange(String key,
long start,
long end)
|
|
byte[] |
getSet(byte[] key,
byte[] value)
Set value of key and return its old value. |
|
String |
getSet(String key,
String value)
|
|
Subscription |
getSubscription()
Returns the current subscription for this connection or null if the connection is not subscribed. |
|
Long |
hDel(byte[] key,
byte[]... fields)
Delete given hash fields. |
|
Long |
hDel(String key,
String... fields)
|
|
Boolean |
hExists(byte[] key,
byte[] field)
Determine if given hash field exists. |
|
Boolean |
hExists(String key,
String field)
|
|
byte[] |
hGet(byte[] key,
byte[] field)
Get value for given field from hash at key. |
|
String |
hGet(String key,
String field)
|
|
Map<byte[],byte[]> |
hGetAll(byte[] key)
Get entire hash stored at key. |
|
Map<String,String> |
hGetAll(String key)
|
|
Double |
hIncrBy(byte[] key,
byte[] field,
double delta)
Increment value of a hash field by the given delta. |
|
Long |
hIncrBy(byte[] key,
byte[] field,
long delta)
Increment value of a hash field by the given delta. |
|
Double |
hIncrBy(String key,
String field,
double delta)
|
|
Long |
hIncrBy(String key,
String field,
long delta)
|
|
Set<byte[]> |
hKeys(byte[] key)
Get key set (fields) of hash at key. |
|
Set<String> |
hKeys(String key)
|
|
Long |
hLen(byte[] key)
Get size of hash at key. |
|
Long |
hLen(String key)
|
|
List<byte[]> |
hMGet(byte[] key,
byte[]... fields)
Get values for given fields from hash at key. |
|
List<String> |
hMGet(String key,
String... fields)
|
|
void |
hMSet(byte[] key,
Map<byte[],byte[]> hashes)
Set multiple hash fields to multiple values using data provided in hashes |
|
void |
hMSet(String key,
Map<String,String> hashes)
|
|
Boolean |
hSet(byte[] key,
byte[] field,
byte[] value)
Set the value of a hash field. |
|
Boolean |
hSet(String key,
String field,
String value)
|
|
Boolean |
hSetNX(byte[] key,
byte[] field,
byte[] value)
Set the value of a hash field only if field does not exist. |
|
Boolean |
hSetNX(String key,
String field,
String value)
|
|
List<byte[]> |
hVals(byte[] key)
Get entry set (values) of hash at field. |
|
List<String> |
hVals(String key)
|
|
Long |
incr(byte[] key)
Increment value of key by 1. |
|
Long |
incr(String key)
|
|
Double |
incrBy(byte[] key,
double value)
Increment value of key by value. |
|
Long |
incrBy(byte[] key,
long value)
Increment value of key by value. |
|
Double |
incrBy(String key,
double value)
|
|
Long |
incrBy(String key,
long value)
|
|
Properties |
info()
Load default server information like mempory cpu utilization replication |
|
Properties |
info(String section)
Load server information for given selection. |
|
boolean |
isClosed()
Indicates whether the underlying connection is closed or not. |
|
boolean |
isPipelined()
Indicates whether the connection is currently pipelined or not. |
|
boolean |
isQueueing()
Indicates whether the connection is in "queue"(or "MULTI") mode or not. |
|
boolean |
isSubscribed()
Indicates whether the current connection is subscribed (to at least one channel) or not. |
|
Set<byte[]> |
keys(byte[] pattern)
Find all keys matching the given pattern. |
|
Collection<String> |
keys(String pattern)
|
|
void |
killClient(String host,
int port)
<<<<<<< HEAD Closes a given client connection identified by ip:port. |
|
Long |
lastSave()
Get time of last RedisServerCommands.bgSave() operation in seconds. |
|
byte[] |
lIndex(byte[] key,
long index)
Get element at index form list at key. |
|
String |
lIndex(String key,
long index)
|
|
Long |
lInsert(byte[] key,
RedisListCommands.Position where,
byte[] pivot,
byte[] value)
Insert value RedisListCommands.Position.BEFORE or RedisListCommands.Position.AFTER existing pivot for key. |
|
Long |
lInsert(String key,
RedisListCommands.Position where,
String pivot,
String value)
|
|
Long |
lLen(byte[] key)
Get the size of list stored at key. |
|
Long |
lLen(String key)
|
|
byte[] |
lPop(byte[] key)
Removes and returns first element in list stored at key. |
|
String |
lPop(String key)
|
|
Long |
lPush(byte[] key,
byte[]... values)
Prepend values to key. |
|
Long |
lPush(String key,
String... values)
|
|
Long |
lPushX(byte[] key,
byte[] value)
Prepend values to key only if the list exits. |
|
Long |
lPushX(String key,
String value)
|
|
List<byte[]> |
lRange(byte[] key,
long start,
long end)
Get elements between begin and end from list at key. |
|
List<String> |
lRange(String key,
long start,
long end)
|
|
Long |
lRem(byte[] key,
long count,
byte[] value)
Removes the first count occurrences of value from the list stored at key. |
|
Long |
lRem(String key,
long count,
String value)
|
|
void |
lSet(byte[] key,
long index,
byte[] value)
Set the value list element at index. |
|
void |
lSet(String key,
long index,
String value)
|
|
void |
lTrim(byte[] key,
long start,
long end)
Trim list at key to elements between begin and end. |
|
void |
lTrim(String key,
long start,
long end)
|
|
List<byte[]> |
mGet(byte[]... keys)
Get the values of all given keys. |
|
List<String> |
mGet(String... keys)
|
|
Boolean |
move(byte[] key,
int dbIndex)
Move given key to database with index. |
|
Boolean |
move(String key,
int dbIndex)
|
|
void |
mSet(Map<byte[],byte[]> tuple)
Set multiple keys to multiple values using key-value pairs provided in tuple. |
|
Boolean |
mSetNX(Map<byte[],byte[]> tuple)
Set multiple keys to multiple values using key-value pairs provided in tuple only if the provided key does
not exist. |
|
Boolean |
mSetNXString(Map<String,String> tuple)
|
|
void |
mSetString(Map<String,String> tuple)
|
|
void |
multi()
Mark the start of a transaction block. |
|
void |
openPipeline()
Activates the pipeline mode for this connection. |
|
Boolean |
persist(byte[] key)
Remove the expiration from given key. |
|
Boolean |
persist(String key)
|
|
Boolean |
pExpire(byte[] key,
long millis)
Set time to live for given key in milliseconds. |
|
Boolean |
pExpire(String key,
long millis)
|
|
Boolean |
pExpireAt(byte[] key,
long unixTimeInMillis)
Set the expiration for given key as a UNIX timestamp in milliseconds. |
|
Boolean |
pExpireAt(String key,
long unixTimeInMillis)
|
|
String |
ping()
Test connection. |
|
void |
pSetEx(byte[] key,
long milliseconds,
byte[] value)
Set the value and expiration in milliseconds for key. |
|
void |
pSetEx(String key,
long seconds,
String value)
Set the value and expiration in milliseconds for key. |
|
void |
pSubscribe(MessageListener listener,
byte[]... patterns)
Subscribes the connection to all channels matching the given patterns. |
|
void |
pSubscribe(MessageListener listener,
String... patterns)
|
|
Long |
pTtl(byte[] key)
Get the time to live for key in milliseconds. |
|
Long |
pTtl(String key)
|
|
Long |
publish(byte[] channel,
byte[] message)
Publishes the given message to the given channel. |
|
Long |
publish(String channel,
String message)
|
|
byte[] |
randomKey()
Return a random key from the keyspace. |
|
void |
rename(byte[] oldName,
byte[] newName)
Rename key oleName to newName. |
|
void |
rename(String oldName,
String newName)
|
|
Boolean |
renameNX(byte[] oldName,
byte[] newName)
Rename key oleName to newName only if newName does not exist. |
|
Boolean |
renameNX(String oldName,
String newName)
|
|
void |
resetConfigStats()
Reset statistic counters on server. |
|
void |
restore(byte[] key,
long ttlInMillis,
byte[] serializedValue)
Create key using the serializedValue, previously obtained using RedisKeyCommands.dump(byte[]). |
|
byte[] |
rPop(byte[] key)
Removes and returns last element in list stored at key. |
|
String |
rPop(String key)
|
|
byte[] |
rPopLPush(byte[] srcKey,
byte[] dstKey)
Remove the last element from list at srcKey, append it to dstKey and return its value. |
|
String |
rPopLPush(String srcKey,
String dstKey)
|
|
Long |
rPush(byte[] key,
byte[]... values)
Append values to key. |
|
Long |
rPush(String key,
String... values)
|
|
Long |
rPushX(byte[] key,
byte[] value)
Append values to key only if the list exists. |
|
Long |
rPushX(String key,
String value)
|
|
Long |
sAdd(byte[] key,
byte[]... values)
Add given values to set at key. |
|
Long |
sAdd(String key,
String... values)
|
|
void |
save()
Synchronous save current db snapshot on server. |
|
Long |
sCard(byte[] key)
Get size of set at key. |
|
Long |
sCard(String key)
|
|
List<Boolean> |
scriptExists(String... scriptSha1)
Check if given scriptShas exist in script cache. |
|
void |
scriptFlush()
Flush lua script cache. |
|
void |
scriptKill()
Kill current lua script execution. |
|
String |
scriptLoad(byte[] script)
Load lua script into scripts cache, without executing it. |
|
String |
scriptLoad(String script)
|
|
Set<byte[]> |
sDiff(byte[]... keys)
Diff all sets for given keys. |
|
Set<String> |
sDiff(String... keys)
|
|
Long |
sDiffStore(byte[] destKey,
byte[]... keys)
Diff all sets for given keys and store result in destKey |
|
Long |
sDiffStore(String destKey,
String... keys)
|
|
void |
select(int dbIndex)
Select the DB with given positive dbIndex. |
|
void |
set(byte[] key,
byte[] value)
Set value for key. |
|
void |
set(String key,
String value)
|
|
Boolean |
setBit(byte[] key,
long offset,
boolean value)
Sets the bit at offset in value stored at key. |
|
Boolean |
setBit(String key,
long offset,
boolean value)
Sets the bit at offset in value stored at key. |
|
void |
setClientName(byte[] name)
Assign given name to current connection. |
|
void |
setClientName(String name)
Assign given name to connection using registered RedisSerializer for name conversion. |
|
void |
setConfig(String param,
String value)
Set server configuration for key to value. |
|
void |
setDeserializePipelineAndTxResults(boolean deserializePipelineAndTxResults)
Specifies if pipelined and tx results should be deserialized to Strings. |
|
void |
setEx(byte[] key,
long seconds,
byte[] value)
Set the value and expiration in seconds for key. |
|
void |
setEx(String key,
long seconds,
String value)
|
|
Boolean |
setNX(byte[] key,
byte[] value)
Set value for key, only if key does not exist. |
|
Boolean |
setNX(String key,
String value)
|
|
void |
setRange(byte[] key,
byte[] value,
long start)
Overwrite parts of key starting at the specified offset with given value. |
|
void |
setRange(String key,
String value,
long start)
|
|
void |
shutdown()
Shutdown server. |
|
void |
shutdown(RedisServerCommands.ShutdownOption option)
Shutdown server. |
|
Set<byte[]> |
sInter(byte[]... keys)
Returns the members intersecting all given sets at keys. |
|
Set<String> |
sInter(String... keys)
|
|
Long |
sInterStore(byte[] destKey,
byte[]... keys)
Intersect all given sets at keys and store result in destKey. |
|
Long |
sInterStore(String destKey,
String... keys)
|
|
Boolean |
sIsMember(byte[] key,
byte[] value)
Check if set at key contains value. |
|
Boolean |
sIsMember(String key,
String value)
|
|
void |
slaveOf(String host,
int port)
Change redis replication setting to new master. |
|
void |
slaveOfNoOne()
Change server into master. |
|
Set<byte[]> |
sMembers(byte[] key)
Get all elements of set at key. |
|
Set<String> |
sMembers(String key)
|
|
Boolean |
sMove(byte[] srcKey,
byte[] destKey,
byte[] value)
Move value from srcKey to |
|
Boolean |
sMove(String srcKey,
String destKey,
String value)
|
|
List<byte[]> |
sort(byte[] key,
SortParameters params)
Sort the elements for key. |
|
Long |
sort(byte[] key,
SortParameters params,
byte[] storeKey)
Sort the elements for key and store result in storeKey. |
|
List<String> |
sort(String key,
SortParameters params)
|
|
Long |
sort(String key,
SortParameters params,
String storeKey)
|
|
byte[] |
sPop(byte[] key)
Remove and return a random member from set at key. |
|
String |
sPop(String key)
|
|
byte[] |
sRandMember(byte[] key)
Get random element from set at key. |
|
List<byte[]> |
sRandMember(byte[] key,
long count)
Get count random elements from set at key. |
|
String |
sRandMember(String key)
|
|
List<String> |
sRandMember(String key,
long count)
|
|
Long |
sRem(byte[] key,
byte[]... values)
Remove given values from set at key and return the number of removed elements. |
|
Long |
sRem(String key,
String... values)
|
|
Long |
strLen(byte[] key)
Get the length of the value stored at key. |
|
Long |
strLen(String key)
|
|
void |
subscribe(MessageListener listener,
byte[]... channels)
Subscribes the connection to the given channels. |
|
void |
subscribe(MessageListener listener,
String... channels)
|
|
Set<byte[]> |
sUnion(byte[]... keys)
Union all sets at given keys. |
|
Set<String> |
sUnion(String... keys)
|
|
Long |
sUnionStore(byte[] destKey,
byte[]... keys)
Union all sets at given keys and store result in destKey. |
|
Long |
sUnionStore(String destKey,
String... keys)
|
|
Long |
time()
Request server timestamp using TIME command. |
|
Long |
ttl(byte[] key)
Get the time to live for key in seconds. |
|
Long |
ttl(String key)
|
|
DataType |
type(byte[] key)
Determine the type stored at key. |
|
DataType |
type(String 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. |
|
Boolean |
zAdd(String key,
double score,
String value)
|
|
Long |
zAdd(String key,
Set<StringRedisConnection.StringTuple> tuples)
|
|
Long |
zCard(byte[] key)
Get the size of sorted set with key. |
|
Long |
zCard(String key)
|
|
Long |
zCount(byte[] key,
double min,
double max)
Count number of elements within sorted set with scores between min and max. |
|
Long |
zCount(String key,
double min,
double max)
|
|
Double |
zIncrBy(byte[] key,
double increment,
byte[] value)
Increment the score of element with value in sorted set by increment. |
|
Double |
zIncrBy(String key,
double increment,
String value)
|
|
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. |
|
Long |
zInterStore(String destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
String... sets)
|
|
Long |
zInterStore(String destKey,
String... sets)
|
|
Set<byte[]> |
zRange(byte[] key,
long start,
long end)
Get elements between begin and end from sorted set. |
|
Set<String> |
zRange(String key,
long start,
long end)
|
|
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<String> |
zRangeByScore(String key,
double min,
double max)
|
|
Set<String> |
zRangeByScore(String key,
double min,
double max,
long offset,
long count)
|
|
Set<RedisZSetCommands.Tuple> |
zRangeByScoreWithScores(byte[] key,
double min,
double max)
Get set of RedisZSetCommands.Tuples where score is between min and max from sorted set. |
|
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<StringRedisConnection.StringTuple> |
zRangeByScoreWithScores(String key,
double min,
double max)
|
|
Set<StringRedisConnection.StringTuple> |
zRangeByScoreWithScores(String key,
double min,
double max,
long offset,
long count)
|
|
Set<RedisZSetCommands.Tuple> |
zRangeWithScores(byte[] key,
long start,
long end)
Get set of RedisZSetCommands.Tuples between begin and end from sorted set. |
|
Set<StringRedisConnection.StringTuple> |
zRangeWithScores(String key,
long start,
long end)
|
|
Long |
zRank(byte[] key,
byte[] value)
Determine the index of element with value in a sorted set. |
|
Long |
zRank(String key,
String value)
|
|
Long |
zRem(byte[] key,
byte[]... values)
Remove values from sorted set. |
|
Long |
zRem(String key,
String... values)
|
|
Long |
zRemRange(byte[] key,
long start,
long end)
Remove elements in range between begin and end from sorted set with key. |
|
Long |
zRemRange(String key,
long start,
long end)
|
|
Long |
zRemRangeByScore(byte[] key,
double min,
double max)
Remove elements with scores between min and max from sorted set with key. |
|
Long |
zRemRangeByScore(String key,
double min,
double max)
|
|
Set<byte[]> |
zRevRange(byte[] key,
long start,
long end)
Get elements in range from begin to end from sorted set ordered high -> low. |
|
Set<String> |
zRevRange(String key,
long start,
long end)
|
|
Set<byte[]> |
zRevRangeByScore(byte[] key,
double min,
double max)
Get elements where score is between min and max from sorted set ordered high -> 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<String> |
zRevRangeByScore(String key,
double min,
double max)
|
|
Set<String> |
zRevRangeByScore(String key,
double min,
double max,
long offset,
long count)
|
|
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 high -> 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<StringRedisConnection.StringTuple> |
zRevRangeByScoreWithScores(String key,
double min,
double max)
|
|
Set<StringRedisConnection.StringTuple> |
zRevRangeByScoreWithScores(String key,
double min,
double max,
long offset,
long count)
|
|
Set<RedisZSetCommands.Tuple> |
zRevRangeWithScores(byte[] key,
long start,
long end)
Get set of RedisZSetCommands.Tuples in range from begin to end from sorted set ordered high -> low. |
|
Set<StringRedisConnection.StringTuple> |
zRevRangeWithScores(String key,
long start,
long end)
|
|
Long |
zRevRank(byte[] key,
byte[] value)
Determine the index of element with value in a sorted set when scored high to low. |
|
Long |
zRevRank(String key,
String value)
|
|
Double |
zScore(byte[] key,
byte[] value)
Get the score of element with value from sorted set with key key. |
|
Double |
zScore(String key,
String value)
|
|
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. |
|
Long |
zUnionStore(String destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
String... sets)
|
|
Long |
zUnionStore(String destKey,
String... sets)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultStringRedisConnection(RedisConnection connection)
DefaultStringRedisConnection instance. Uses StringRedisSerializer as
underlying serializer.
connection - Redis connection
public DefaultStringRedisConnection(RedisConnection connection,
RedisSerializer<String> serializer)
DefaultStringRedisConnection instance.
connection - Redis connectionserializer - String serializer| Method Detail |
|---|
public Long append(byte[] key,
byte[] value)
RedisStringCommandsvalue to key.
append in interface RedisStringCommandshttp://redis.io/commands/appendpublic void bgSave()
RedisServerCommands
bgSave in interface RedisServerCommandshttp://redis.io/commands/bgsavepublic void bgReWriteAof()
RedisServerCommands
bgReWriteAof in interface RedisServerCommandshttp://redis.io/commands/bgrewriteaof@Deprecated public void bgWriteAof()
bgReWriteAof().
RedisServerCommands
bgWriteAof in interface RedisServerCommandshttp://redis.io/commands/bgrewriteaof
public List<byte[]> bLPop(int timeout,
byte[]... keys)
RedisListCommandskeys (see: RedisListCommands.lPop(byte[])). timeout reached.
bLPop in interface RedisListCommandshttp://redis.io/commands/blpop
public List<byte[]> bRPop(int timeout,
byte[]... keys)
RedisListCommandskeys (see: RedisListCommands.rPop(byte[])). timeout reached.
bRPop in interface RedisListCommandshttp://redis.io/commands/brpop
public byte[] bRPopLPush(int timeout,
byte[] srcKey,
byte[] dstKey)
RedisListCommandssrcKey, append it to dstKey and return its value (see
RedisListCommands.rPopLPush(byte[], byte[])). timeout reached.
bRPopLPush in interface RedisListCommandshttp://redis.io/commands/brpoplpush
public void close()
throws RedisSystemException
RedisConnection
close in interface RedisConnectionRedisSystemExceptionpublic Long dbSize()
RedisServerCommands
dbSize in interface RedisServerCommandshttp://redis.io/commands/dbsizepublic Long decr(byte[] key)
RedisStringCommandskey by 1.
decr in interface RedisStringCommandshttp://redis.io/commands/decr
public Long decrBy(byte[] key,
long value)
RedisStringCommandskey by value.
decrBy in interface RedisStringCommandshttp://redis.io/commands/decrbypublic Long del(byte[]... keys)
RedisKeyCommandskeys.
del in interface RedisKeyCommandshttp://redis.io/commands/delpublic void discard()
RedisTxCommandsRedisTxCommands.multi().
discard in interface RedisTxCommandshttp://redis.io/commands/discardpublic byte[] echo(byte[] message)
RedisConnectionCommandsmessage via server roundtrip.
echo in interface RedisConnectionCommandshttp://redis.io/commands/echopublic List<Object> exec()
RedisTxCommandsRedisTxCommands.multi(). #watch(byte[]) the operation will fail if any of watched keys has been modified.
exec in interface RedisTxCommandshttp://redis.io/commands/execpublic Boolean exists(byte[] key)
RedisKeyCommandskey exists.
exists in interface RedisKeyCommandshttp://redis.io/commands/exists
public Boolean expire(byte[] key,
long seconds)
RedisKeyCommandskey in seconds.
expire in interface RedisKeyCommandshttp://redis.io/commands/expire
public Boolean expireAt(byte[] key,
long unixTime)
RedisKeyCommandskey as a UNIX timestamp.
expireAt in interface RedisKeyCommandshttp://redis.io/commands/expireatpublic void flushAll()
RedisServerCommands
flushAll in interface RedisServerCommandshttp://redis.io/commands/flushallpublic void flushDb()
RedisServerCommands
flushDb in interface RedisServerCommandshttp://redis.io/commands/flushdbpublic byte[] get(byte[] key)
RedisStringCommandskey.
get in interface RedisStringCommandshttp://redis.io/commands/get
public Boolean getBit(byte[] key,
long offset)
RedisStringCommandsoffset of value at key.
getBit in interface RedisStringCommandshttp://redis.io/commands/getbitpublic List<String> getConfig(String pattern)
RedisServerCommandspattern from server.
getConfig in interface RedisServerCommandshttp://redis.io/commands/config-getpublic Object getNativeConnection()
RedisConnection
getNativeConnection in interface RedisConnection
public byte[] getRange(byte[] key,
long start,
long end)
RedisStringCommandskey between begin and end.
getRange in interface RedisStringCommandshttp://redis.io/commands/getrange
public byte[] getSet(byte[] key,
byte[] value)
RedisStringCommandskey and return its old value.
getSet in interface RedisStringCommandshttp://redis.io/commands/getsetpublic Subscription getSubscription()
RedisPubSubCommands
getSubscription in interface RedisPubSubCommands
public Long hDel(byte[] key,
byte[]... fields)
RedisHashCommandsfields.
hDel in interface RedisHashCommandshttp://redis.io/commands/hdel
public Boolean hExists(byte[] key,
byte[] field)
RedisHashCommandsfield exists.
hExists in interface RedisHashCommandshttp://redis.io/commands/hexits
public byte[] hGet(byte[] key,
byte[] field)
RedisHashCommandsfield from hash at key.
hGet in interface RedisHashCommandshttp://redis.io/commands/hgetpublic Map<byte[],byte[]> hGetAll(byte[] key)
RedisHashCommandskey.
hGetAll in interface RedisHashCommandshttp://redis.io/commands/hgetall
public Long hIncrBy(byte[] key,
byte[] field,
long delta)
RedisHashCommandsvalue of a hash field by the given delta.
hIncrBy in interface RedisHashCommandshttp://redis.io/commands/hincrby
public 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 Set<byte[]> hKeys(byte[] key)
RedisHashCommandskey.
hKeys in interface RedisHashCommandshttp://redis.io/commands/h?public Long hLen(byte[] key)
RedisHashCommandskey.
hLen in interface RedisHashCommandshttp://redis.io/commands/hlen
public List<byte[]> hMGet(byte[] key,
byte[]... fields)
RedisHashCommandsfields from hash at key.
hMGet in interface RedisHashCommandshttp://redis.io/commands/hmget
public void hMSet(byte[] key,
Map<byte[],byte[]> hashes)
RedisHashCommandshashes
hMSet in interface RedisHashCommandshttp://redis.io/commands/hmset
public Boolean hSet(byte[] key,
byte[] field,
byte[] value)
RedisHashCommandsvalue of a hash field.
hSet in interface RedisHashCommandshttp://redis.io/commands/hset
public 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 List<byte[]> hVals(byte[] key)
RedisHashCommandsfield.
hVals in interface RedisHashCommandshttp://redis.io/commands/hvalspublic Long incr(byte[] key)
RedisStringCommandskey by 1.
incr in interface RedisStringCommandshttp://redis.io/commands/incr
public Long incrBy(byte[] key,
long value)
RedisStringCommandskey by value.
incrBy in interface RedisStringCommandshttp://redis.io/commands/incrby
public Double incrBy(byte[] key,
double value)
RedisStringCommandskey by value.
incrBy in interface RedisStringCommandshttp://redis.io/commands/incrbyfloatpublic Properties info()
RedisServerCommands
info in interface RedisServerCommandshttp://redis.io/commands/infopublic Properties info(String section)
RedisServerCommandsselection.
info in interface RedisServerCommandshttp://redis.io/commands/infopublic boolean isClosed()
RedisConnection
isClosed in interface RedisConnectionpublic boolean isQueueing()
RedisConnection
isQueueing in interface RedisConnectionpublic boolean isSubscribed()
RedisPubSubCommands
isSubscribed in interface RedisPubSubCommandspublic Set<byte[]> keys(byte[] pattern)
RedisKeyCommandspattern.
keys in interface RedisKeyCommandshttp://redis.io/commands/keyspublic Long lastSave()
RedisServerCommandsRedisServerCommands.bgSave() operation in seconds.
lastSave in interface RedisServerCommandshttp://redis.io/commands/lastsave
public byte[] lIndex(byte[] key,
long index)
RedisListCommandsindex form list at key.
lIndex in interface RedisListCommandshttp://redis.io/commands/lindex
public Long lInsert(byte[] key,
RedisListCommands.Position where,
byte[] pivot,
byte[] value)
RedisListCommandsvalue RedisListCommands.Position.BEFORE or RedisListCommands.Position.AFTER existing pivot for key.
lInsert in interface RedisListCommandshttp://redis.io/commands/linsertpublic Long lLen(byte[] key)
RedisListCommandskey.
lLen in interface RedisListCommandshttp://redis.io/commands/llenpublic byte[] lPop(byte[] key)
RedisListCommandskey.
lPop in interface RedisListCommandshttp://redis.io/commands/lpop
public Long lPush(byte[] key,
byte[]... values)
RedisListCommandsvalues to key.
lPush in interface RedisListCommandshttp://redis.io/commands/lpush
public Long lPushX(byte[] key,
byte[] value)
RedisListCommandsvalues to key only if the list exits.
lPushX in interface RedisListCommandshttp://redis.io/commands/lpushx
public List<byte[]> lRange(byte[] key,
long start,
long end)
RedisListCommandsbegin and end from list at key.
lRange in interface RedisListCommandshttp://redis.io/commands/lrange
public Long lRem(byte[] key,
long count,
byte[] value)
RedisListCommandscount occurrences of value from the list stored at key.
lRem in interface RedisListCommandshttp://redis.io/commands/lrem
public void lSet(byte[] key,
long index,
byte[] value)
RedisListCommandsvalue list element at index.
lSet in interface RedisListCommandshttp://redis.io/commands/lset
public void lTrim(byte[] key,
long start,
long end)
RedisListCommandskey to elements between begin and end.
lTrim in interface RedisListCommandshttp://redis.io/commands/ltrimpublic List<byte[]> mGet(byte[]... keys)
RedisStringCommandskeys.
mGet in interface RedisStringCommandshttp://redis.io/commands/mgetpublic void mSet(Map<byte[],byte[]> tuple)
RedisStringCommandstuple.
mSet in interface RedisStringCommandshttp://redis.io/commands/msetpublic Boolean mSetNX(Map<byte[],byte[]> tuple)
RedisStringCommandstuple only if the provided key does
not exist.
mSetNX in interface RedisStringCommandshttp://redis.io/commands/msetnxpublic void multi()
RedisTxCommandsRedisTxCommands.exec() or rolled back using RedisTxCommands.discard()
.
multi in interface RedisTxCommandshttp://redis.io/commands/multipublic Boolean persist(byte[] key)
RedisKeyCommandskey.
persist in interface RedisKeyCommandshttp://redis.io/commands/persist
public Boolean move(byte[] key,
int dbIndex)
RedisKeyCommandskey to database with index.
move in interface RedisKeyCommandshttp://redis.io/commands/movepublic String ping()
RedisConnectionCommands
ping in interface RedisConnectionCommandshttp://redis.io/commands/ping
public void pSubscribe(MessageListener listener,
byte[]... patterns)
RedisPubSubCommands
pSubscribe in interface RedisPubSubCommandslistener - message listenerpatterns - channel name patterns
public Long publish(byte[] channel,
byte[] message)
RedisPubSubCommands
publish in interface RedisPubSubCommandschannel - the channel to publish tomessage - message to publish
public byte[] randomKey()
RedisKeyCommands
randomKey in interface RedisKeyCommandshttp://redis.io/commands/randomkey
public void rename(byte[] oldName,
byte[] newName)
RedisKeyCommandsoleName to newName.
rename in interface RedisKeyCommandshttp://redis.io/commands/rename
public Boolean renameNX(byte[] oldName,
byte[] newName)
RedisKeyCommandsoleName to newName only if newName does not exist.
renameNX in interface RedisKeyCommandshttp://redis.io/commands/renamenxpublic void resetConfigStats()
RedisServerCommandsRedisServerCommands.info().
resetConfigStats in interface RedisServerCommandshttp://redis.io/commands/config-resetstatpublic byte[] rPop(byte[] key)
RedisListCommandskey.
rPop in interface RedisListCommandshttp://redis.io/commands/rpop
public byte[] rPopLPush(byte[] srcKey,
byte[] dstKey)
RedisListCommandssrcKey, append it to dstKey and return its value.
rPopLPush in interface RedisListCommandshttp://redis.io/commands/rpoplpush
public Long rPush(byte[] key,
byte[]... values)
RedisListCommandsvalues to key.
rPush in interface RedisListCommandshttp://redis.io/commands/rpush
public Long rPushX(byte[] key,
byte[] value)
RedisListCommands values to key only if the list exists.
rPushX in interface RedisListCommandshttp://redis.io/commands/rpushx
public Long sAdd(byte[] key,
byte[]... values)
RedisSetCommandsvalues to set at key.
sAdd in interface RedisSetCommandshttp://redis.io/commands/saddpublic void save()
RedisServerCommands
save in interface RedisServerCommandshttp://redis.io/commands/savepublic Long sCard(byte[] key)
RedisSetCommandskey.
sCard in interface RedisSetCommandshttp://redis.io/commands/scardpublic Set<byte[]> sDiff(byte[]... keys)
RedisSetCommandskeys.
sDiff in interface RedisSetCommandshttp://redis.io/commands/sdiff
public Long sDiffStore(byte[] destKey,
byte[]... keys)
RedisSetCommandskeys and store result in destKey
sDiffStore in interface RedisSetCommandshttp://redis.io/commands/sdiffstorepublic void select(int dbIndex)
RedisConnectionCommandsdbIndex.
select in interface RedisConnectionCommandshttp://redis.io/commands/select
public void set(byte[] key,
byte[] value)
RedisStringCommandsvalue for key.
set in interface RedisStringCommandshttp://redis.io/commands/set
public Boolean setBit(byte[] key,
long offset,
boolean value)
RedisStringCommandsoffset in value stored at key.
setBit in interface RedisStringCommandsoffset.http://redis.io/commands/setbit
public void setConfig(String param,
String value)
RedisServerCommandskey to value.
setConfig in interface RedisServerCommandshttp://redis.io/commands/config-set
public void setEx(byte[] key,
long seconds,
byte[] value)
RedisStringCommandsvalue and expiration in seconds for key.
setEx in interface RedisStringCommandshttp://redis.io/commands/setex
public void pSetEx(byte[] key,
long milliseconds,
byte[] value)
RedisStringCommandsvalue and expiration in milliseconds for key.
pSetEx in interface RedisStringCommandshttp://redis.io/commands/psetex
public Boolean setNX(byte[] key,
byte[] value)
RedisStringCommandsvalue for key, only if key does not exist.
setNX in interface RedisStringCommandshttp://redis.io/commands/setnx
public void setRange(byte[] key,
byte[] value,
long start)
RedisStringCommandskey starting at the specified offset with given value.
setRange in interface RedisStringCommandshttp://redis.io/commands/setrangepublic void shutdown()
RedisServerCommands
shutdown in interface RedisServerCommandshttp://redis.io/commands/shutdownpublic void shutdown(RedisServerCommands.ShutdownOption option)
RedisServerCommands
shutdown in interface RedisServerCommandshttp://redis.io/commands/shutdownpublic Set<byte[]> sInter(byte[]... keys)
RedisSetCommandskeys.
sInter in interface RedisSetCommandshttp://redis.io/commands/sinter
public Long sInterStore(byte[] destKey,
byte[]... keys)
RedisSetCommandskeys and store result in destKey.
sInterStore in interface RedisSetCommandshttp://redis.io/commands/sinterstore
public Boolean sIsMember(byte[] key,
byte[] value)
RedisSetCommandskey contains value.
sIsMember in interface RedisSetCommandshttp://redis.io/commands/sismemberpublic Set<byte[]> sMembers(byte[] key)
RedisSetCommandskey.
sMembers in interface RedisSetCommandshttp://redis.io/commands/smembers
public Boolean sMove(byte[] srcKey,
byte[] destKey,
byte[] value)
RedisSetCommandsvalue from srcKey to
sMove in interface RedisSetCommandshttp://redis.io/commands/smove
public Long sort(byte[] key,
SortParameters params,
byte[] storeKey)
RedisKeyCommandskey and store result in storeKey.
sort in interface RedisKeyCommandshttp://redis.io/commands/sort
public List<byte[]> sort(byte[] key,
SortParameters params)
RedisKeyCommandskey.
sort in interface RedisKeyCommandshttp://redis.io/commands/sortpublic byte[] sPop(byte[] key)
RedisSetCommandskey.
sPop in interface RedisSetCommandshttp://redis.io/commands/spoppublic byte[] sRandMember(byte[] key)
RedisSetCommandskey.
sRandMember in interface RedisSetCommandshttp://redis.io/commands/srandmember
public List<byte[]> sRandMember(byte[] key,
long count)
RedisSetCommandscount random elements from set at key.
sRandMember in interface RedisSetCommandshttp://redis.io/commands/srandmember
public Long sRem(byte[] key,
byte[]... values)
RedisSetCommandsvalues from set at key and return the number of removed elements.
sRem in interface RedisSetCommandshttp://redis.io/commands/srempublic Long strLen(byte[] key)
RedisStringCommandskey.
strLen in interface RedisStringCommandshttp://redis.io/commands/strlenpublic Long bitCount(byte[] key)
RedisStringCommandskey.
bitCount in interface RedisStringCommandshttp://redis.io/commands/bitcount
public Long bitCount(byte[] key,
long begin,
long end)
RedisStringCommandskey between begin and
end.
bitCount in interface RedisStringCommandshttp://redis.io/commands/bitcount
public Long bitOp(RedisStringCommands.BitOperation op,
byte[] destination,
byte[]... keys)
RedisStringCommands
bitOp in interface RedisStringCommandshttp://redis.io/commands/bitop
public void subscribe(MessageListener listener,
byte[]... channels)
RedisPubSubCommands
subscribe in interface RedisPubSubCommandslistener - message listenerchannels - channel namespublic Set<byte[]> sUnion(byte[]... keys)
RedisSetCommandskeys.
sUnion in interface RedisSetCommandshttp://redis.io/commands/sunion
public Long sUnionStore(byte[] destKey,
byte[]... keys)
RedisSetCommandskeys and store result in destKey.
sUnionStore in interface RedisSetCommandshttp://redis.io/commands/sunionstorepublic Long ttl(byte[] key)
RedisKeyCommandskey in seconds.
ttl in interface RedisKeyCommandshttp://redis.io/commands/ttlpublic DataType type(byte[] key)
RedisKeyCommandskey.
type in interface RedisKeyCommandshttp://redis.io/commands/typepublic void unwatch()
RedisTxCommands#watch(byte[]) keys.
unwatch in interface RedisTxCommandshttp://redis.io/commands/unwatchpublic void watch(byte[]... keys)
RedisTxCommandskeys for modifications during transaction started with RedisTxCommands.multi().
watch in interface RedisTxCommandshttp://redis.io/commands/watch
public Boolean zAdd(byte[] key,
double score,
byte[] value)
RedisZSetCommandsvalue to a sorted set at key, or update its score if it already exists.
zAdd in interface RedisZSetCommandshttp://redis.io/commands/zadd
public Long zAdd(byte[] key,
Set<RedisZSetCommands.Tuple> tuples)
RedisZSetCommandstuples to a sorted set at key, or update its score if it already exists.
zAdd in interface RedisZSetCommandshttp://redis.io/commands/zaddpublic Long zCard(byte[] key)
RedisZSetCommandskey.
zCard in interface RedisZSetCommandshttp://redis.io/commands/zcard
public Long zCount(byte[] key,
double min,
double max)
RedisZSetCommandsmin and max.
zCount in interface RedisZSetCommandshttp://redis.io/commands/zcount
public Double zIncrBy(byte[] key,
double increment,
byte[] value)
RedisZSetCommandsvalue in sorted set by increment.
zIncrBy in interface RedisZSetCommandshttp://redis.io/commands/zincrby
public Long zInterStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
byte[]... sets)
RedisZSetCommandssets and store result in destination key.
zInterStore in interface RedisZSetCommandshttp://redis.io/commands/zinterstore
public Long zInterStore(byte[] destKey,
byte[]... sets)
RedisZSetCommandssets and store result in destination key.
zInterStore in interface RedisZSetCommandshttp://redis.io/commands/zinterstore
public Set<byte[]> zRange(byte[] key,
long start,
long end)
RedisZSetCommandsbegin and end from sorted set.
zRange in interface RedisZSetCommandshttp://redis.io/commands/zrange
public 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.
zRangeByScore in interface RedisZSetCommandshttp://redis.io/commands/zrangebyscore
public Set<byte[]> zRangeByScore(byte[] key,
double min,
double max)
RedisZSetCommandsmin and max from sorted set.
zRangeByScore in interface RedisZSetCommandshttp://redis.io/commands/zrangebyscore
public 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.
zRangeByScoreWithScores in interface RedisZSetCommandshttp://redis.io/commands/zrangebyscore
public Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key,
double min,
double max)
RedisZSetCommandsRedisZSetCommands.Tuples where score is between min and max from sorted set.
zRangeByScoreWithScores in interface RedisZSetCommandshttp://redis.io/commands/zrangebyscore
public Set<RedisZSetCommands.Tuple> zRangeWithScores(byte[] key,
long start,
long end)
RedisZSetCommandsRedisZSetCommands.Tuples between begin and end from sorted set.
zRangeWithScores in interface RedisZSetCommandshttp://redis.io/commands/zrange
public 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.
zRevRangeByScore in interface RedisZSetCommandshttp://redis.io/commands/zrevrangebyscore
public Set<byte[]> zRevRangeByScore(byte[] key,
double min,
double max)
RedisZSetCommandsmin and max from sorted set ordered high -> low.
zRevRangeByScore in interface RedisZSetCommandshttp://redis.io/commands/zrevrange
public 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.
zRevRangeByScoreWithScores in interface RedisZSetCommandshttp://redis.io/commands/zrevrangebyscore
public Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] key,
double min,
double max)
RedisZSetCommandsRedisZSetCommands.Tuple where score is between min and max from sorted set ordered high -> low.
zRevRangeByScoreWithScores in interface RedisZSetCommandshttp://redis.io/commands/zrevrange
public Long zRank(byte[] key,
byte[] value)
RedisZSetCommandsvalue in a sorted set.
zRank in interface RedisZSetCommandshttp://redis.io/commands/zrank
public Long zRem(byte[] key,
byte[]... values)
RedisZSetCommandsvalues from sorted set. Return number of removed elements.
zRem in interface RedisZSetCommandshttp://redis.io/commands/zrem
public Long zRemRange(byte[] key,
long start,
long end)
RedisZSetCommandsbegin and end from sorted set with key.
zRemRange in interface RedisZSetCommandshttp://redis.io/commands/zremrange
public Long zRemRangeByScore(byte[] key,
double min,
double max)
RedisZSetCommandsmin and max from sorted set with key.
zRemRangeByScore in interface RedisZSetCommandshttp://redis.io/commands/zremrangebyscore
public Set<byte[]> zRevRange(byte[] key,
long start,
long end)
RedisZSetCommandsbegin to end from sorted set ordered high -> low.
zRevRange in interface RedisZSetCommandshttp://redis.io/commands/zrevrange
public Set<RedisZSetCommands.Tuple> zRevRangeWithScores(byte[] key,
long start,
long end)
RedisZSetCommandsRedisZSetCommands.Tuples in range from begin to end from sorted set ordered high -> low.
zRevRangeWithScores in interface RedisZSetCommandshttp://redis.io/commands/zrevrange
public Long zRevRank(byte[] key,
byte[] value)
RedisZSetCommandsvalue in a sorted set when scored high to low.
zRevRank in interface RedisZSetCommandshttp://redis.io/commands/zrevrank
public Double zScore(byte[] key,
byte[] value)
RedisZSetCommandsvalue from sorted set with key key.
zScore in interface RedisZSetCommandshttp://redis.io/commands/zrem
public Long zUnionStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
byte[]... sets)
RedisZSetCommandssets and store result in destination key.
zUnionStore in interface RedisZSetCommandshttp://redis.io/commands/zunionstore
public Long zUnionStore(byte[] destKey,
byte[]... sets)
RedisZSetCommandssets and store result in destination key.
zUnionStore in interface RedisZSetCommandshttp://redis.io/commands/zunionstore
public Boolean pExpire(byte[] key,
long millis)
RedisKeyCommandskey in milliseconds.
pExpire in interface RedisKeyCommandshttp://redis.io/commands/pexpire
public Boolean pExpireAt(byte[] key,
long unixTimeInMillis)
RedisKeyCommandskey as a UNIX timestamp in milliseconds.
pExpireAt in interface RedisKeyCommandshttp://redis.io/commands/pexpireatpublic Long pTtl(byte[] key)
RedisKeyCommandskey in milliseconds.
pTtl in interface RedisKeyCommandshttp://redis.io/commands/pttlpublic byte[] dump(byte[] key)
RedisKeyCommandskey.
dump in interface RedisKeyCommandshttp://redis.io/commands/dump
public void restore(byte[] key,
long ttlInMillis,
byte[] serializedValue)
RedisKeyCommandskey using the serializedValue, previously obtained using RedisKeyCommands.dump(byte[]).
restore in interface RedisKeyCommandshttp://redis.io/commands/restorepublic void scriptFlush()
RedisScriptingCommands
scriptFlush in interface RedisScriptingCommandshttp://redis.io/commands/script-flushpublic void scriptKill()
RedisScriptingCommands
scriptKill in interface RedisScriptingCommandshttp://redis.io/commands/script-killpublic String scriptLoad(byte[] script)
RedisScriptingCommands#evalSha(String, ReturnType, int, byte[]).
scriptLoad in interface RedisScriptingCommandshttp://redis.io/commands/script-loadpublic List<Boolean> scriptExists(String... scriptSha1)
RedisScriptingCommandsscriptShas exist in script cache.
scriptExists in interface RedisScriptingCommandshttp://redis.io/commands/script-exits
public <T> T eval(byte[] script,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
RedisScriptingCommandsscript.
eval in interface RedisScriptingCommandshttp://redis.io/commands/eval
public <T> T evalSha(String scriptSha1,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
RedisScriptingCommandsscriptSha.
evalSha in interface RedisScriptingCommandshttp://redis.io/commands/evalsha
public Long append(String key,
String value)
append in interface StringRedisConnection
public List<String> bLPop(int timeout,
String... keys)
bLPop in interface StringRedisConnection
public List<String> bRPop(int timeout,
String... keys)
bRPop in interface StringRedisConnection
public String bRPopLPush(int timeout,
String srcKey,
String dstKey)
bRPopLPush in interface StringRedisConnectionpublic Long decr(String key)
decr in interface StringRedisConnection
public Long decrBy(String key,
long value)
decrBy in interface StringRedisConnectionpublic Long del(String... keys)
del in interface StringRedisConnectionpublic String echo(String message)
echo in interface StringRedisConnectionpublic Boolean exists(String key)
exists in interface StringRedisConnection
public Boolean expire(String key,
long seconds)
expire in interface StringRedisConnection
public Boolean expireAt(String key,
long unixTime)
expireAt in interface StringRedisConnectionpublic String get(String key)
get in interface StringRedisConnection
public Boolean getBit(String key,
long offset)
getBit in interface StringRedisConnection
public String getRange(String key,
long start,
long end)
getRange in interface StringRedisConnection
public String getSet(String key,
String value)
getSet in interface StringRedisConnection
public Long hDel(String key,
String... fields)
hDel in interface StringRedisConnection
public Boolean hExists(String key,
String field)
hExists in interface StringRedisConnection
public String hGet(String key,
String field)
hGet in interface StringRedisConnectionpublic Map<String,String> hGetAll(String key)
hGetAll in interface StringRedisConnection
public Long hIncrBy(String key,
String field,
long delta)
hIncrBy in interface StringRedisConnection
public Double hIncrBy(String key,
String field,
double delta)
hIncrBy in interface StringRedisConnectionpublic Set<String> hKeys(String key)
hKeys in interface StringRedisConnectionpublic Long hLen(String key)
hLen in interface StringRedisConnection
public List<String> hMGet(String key,
String... fields)
hMGet in interface StringRedisConnection
public void hMSet(String key,
Map<String,String> hashes)
hMSet in interface StringRedisConnection
public Boolean hSet(String key,
String field,
String value)
hSet in interface StringRedisConnection
public Boolean hSetNX(String key,
String field,
String value)
hSetNX in interface StringRedisConnectionpublic List<String> hVals(String key)
hVals in interface StringRedisConnectionpublic Long incr(String key)
incr in interface StringRedisConnection
public Long incrBy(String key,
long value)
incrBy in interface StringRedisConnection
public Double incrBy(String key,
double value)
incrBy in interface StringRedisConnectionpublic Collection<String> keys(String pattern)
keys in interface StringRedisConnection
public String lIndex(String key,
long index)
lIndex in interface StringRedisConnection
public Long lInsert(String key,
RedisListCommands.Position where,
String pivot,
String value)
lInsert in interface StringRedisConnectionpublic Long lLen(String key)
lLen in interface StringRedisConnectionpublic String lPop(String key)
lPop in interface StringRedisConnection
public Long lPush(String key,
String... values)
lPush in interface StringRedisConnection
public Long lPushX(String key,
String value)
lPushX in interface StringRedisConnection
public List<String> lRange(String key,
long start,
long end)
lRange in interface StringRedisConnection
public Long lRem(String key,
long count,
String value)
lRem in interface StringRedisConnection
public void lSet(String key,
long index,
String value)
lSet in interface StringRedisConnection
public void lTrim(String key,
long start,
long end)
lTrim in interface StringRedisConnectionpublic List<String> mGet(String... keys)
mGet in interface StringRedisConnectionpublic Boolean mSetNXString(Map<String,String> tuple)
mSetNXString in interface StringRedisConnectionpublic void mSetString(Map<String,String> tuple)
mSetString in interface StringRedisConnectionpublic Boolean persist(String key)
persist in interface StringRedisConnection
public Boolean move(String key,
int dbIndex)
move in interface StringRedisConnection
public void pSubscribe(MessageListener listener,
String... patterns)
pSubscribe in interface StringRedisConnection
public Long publish(String channel,
String message)
publish in interface StringRedisConnection
public void rename(String oldName,
String newName)
rename in interface StringRedisConnection
public Boolean renameNX(String oldName,
String newName)
renameNX in interface StringRedisConnectionpublic String rPop(String key)
rPop in interface StringRedisConnection
public String rPopLPush(String srcKey,
String dstKey)
rPopLPush in interface StringRedisConnection
public Long rPush(String key,
String... values)
rPush in interface StringRedisConnection
public Long rPushX(String key,
String value)
rPushX in interface StringRedisConnection
public Long sAdd(String key,
String... values)
sAdd in interface StringRedisConnectionpublic Long sCard(String key)
sCard in interface StringRedisConnectionpublic Set<String> sDiff(String... keys)
sDiff in interface StringRedisConnection
public Long sDiffStore(String destKey,
String... keys)
sDiffStore in interface StringRedisConnection
public void set(String key,
String value)
set in interface StringRedisConnection
public Boolean setBit(String key,
long offset,
boolean value)
StringRedisConnectionoffset in value stored at key.
setBit in interface StringRedisConnectionoffset.
public void setEx(String key,
long seconds,
String value)
setEx in interface StringRedisConnection
public void pSetEx(String key,
long seconds,
String value)
StringRedisConnectionvalue and expiration in milliseconds for key.
pSetEx in interface StringRedisConnectionhttp://redis.io/commands/psetex
public Boolean setNX(String key,
String value)
setNX in interface StringRedisConnection
public void setRange(String key,
String value,
long start)
setRange in interface StringRedisConnectionpublic Set<String> sInter(String... keys)
sInter in interface StringRedisConnection
public Long sInterStore(String destKey,
String... keys)
sInterStore in interface StringRedisConnection
public Boolean sIsMember(String key,
String value)
sIsMember in interface StringRedisConnectionpublic Set<String> sMembers(String key)
sMembers in interface StringRedisConnection
public Boolean sMove(String srcKey,
String destKey,
String value)
sMove in interface StringRedisConnection
public Long sort(String key,
SortParameters params,
String storeKey)
sort in interface StringRedisConnection
public List<String> sort(String key,
SortParameters params)
sort in interface StringRedisConnectionpublic String sPop(String key)
sPop in interface StringRedisConnectionpublic String sRandMember(String key)
sRandMember in interface StringRedisConnection
public List<String> sRandMember(String key,
long count)
sRandMember in interface StringRedisConnection
public Long sRem(String key,
String... values)
sRem in interface StringRedisConnectionpublic Long strLen(String key)
strLen in interface StringRedisConnectionpublic Long bitCount(String key)
bitCount in interface StringRedisConnection
public Long bitCount(String key,
long begin,
long end)
bitCount in interface StringRedisConnection
public Long bitOp(RedisStringCommands.BitOperation op,
String destination,
String... keys)
bitOp in interface StringRedisConnection
public void subscribe(MessageListener listener,
String... channels)
subscribe in interface StringRedisConnectionpublic Set<String> sUnion(String... keys)
sUnion in interface StringRedisConnection
public Long sUnionStore(String destKey,
String... keys)
sUnionStore in interface StringRedisConnectionpublic Long ttl(String key)
ttl in interface StringRedisConnectionpublic DataType type(String key)
type in interface StringRedisConnection
public Boolean zAdd(String key,
double score,
String value)
zAdd in interface StringRedisConnection
public Long zAdd(String key,
Set<StringRedisConnection.StringTuple> tuples)
zAdd in interface StringRedisConnectionpublic Long zCard(String key)
zCard in interface StringRedisConnection
public Long zCount(String key,
double min,
double max)
zCount in interface StringRedisConnection
public Double zIncrBy(String key,
double increment,
String value)
zIncrBy in interface StringRedisConnection
public Long zInterStore(String destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
String... sets)
zInterStore in interface StringRedisConnection
public Long zInterStore(String destKey,
String... sets)
zInterStore in interface StringRedisConnection
public Set<String> zRange(String key,
long start,
long end)
zRange in interface StringRedisConnection
public Set<String> zRangeByScore(String key,
double min,
double max,
long offset,
long count)
zRangeByScore in interface StringRedisConnection
public Set<String> zRangeByScore(String key,
double min,
double max)
zRangeByScore in interface StringRedisConnection
public Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key,
double min,
double max,
long offset,
long count)
zRangeByScoreWithScores in interface StringRedisConnection
public Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key,
double min,
double max)
zRangeByScoreWithScores in interface StringRedisConnection
public Set<StringRedisConnection.StringTuple> zRangeWithScores(String key,
long start,
long end)
zRangeWithScores in interface StringRedisConnection
public Long zRank(String key,
String value)
zRank in interface StringRedisConnection
public Long zRem(String key,
String... values)
zRem in interface StringRedisConnection
public Long zRemRange(String key,
long start,
long end)
zRemRange in interface StringRedisConnection
public Long zRemRangeByScore(String key,
double min,
double max)
zRemRangeByScore in interface StringRedisConnection
public Set<String> zRevRange(String key,
long start,
long end)
zRevRange in interface StringRedisConnection
public Set<StringRedisConnection.StringTuple> zRevRangeWithScores(String key,
long start,
long end)
zRevRangeWithScores in interface StringRedisConnection
public Set<String> zRevRangeByScore(String key,
double min,
double max)
zRevRangeByScore in interface StringRedisConnection
public Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key,
double min,
double max)
zRevRangeByScoreWithScores in interface StringRedisConnection
public Set<String> zRevRangeByScore(String key,
double min,
double max,
long offset,
long count)
zRevRangeByScore in interface StringRedisConnection
public Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key,
double min,
double max,
long offset,
long count)
zRevRangeByScoreWithScores in interface StringRedisConnection
public Long zRevRank(String key,
String value)
zRevRank in interface StringRedisConnection
public Double zScore(String key,
String value)
zScore in interface StringRedisConnection
public Long zUnionStore(String destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
String... sets)
zUnionStore in interface StringRedisConnection
public Long zUnionStore(String destKey,
String... sets)
zUnionStore in interface StringRedisConnectionpublic List<Object> closePipeline()
RedisConnection
closePipeline in interface RedisConnectionpublic boolean isPipelined()
RedisConnection
isPipelined in interface RedisConnectionRedisConnection.openPipeline(),
RedisConnection.isQueueing()public void openPipeline()
RedisConnectionRedisConnection.closePipeline(). Calling this method when the connection is already pipelined has no effect.
Pipelining is used for issuing commands without requesting the response right away but rather at the end of the
batch. While somewhat similar to MULTI, pipelining does not guarantee atomicity - it only tries to improve
performance when issuing a lot of commands (such as in batching scenarios).
Note:
Consider doing some performance testing before using this feature since in many cases the performance benefits are minimal yet the impact on usage are not.
openPipeline in interface RedisConnectionRedisTxCommands.multi()public Object execute(String command)
execute in interface StringRedisConnection
public Object execute(String command,
byte[]... args)
RedisCommands
execute in interface RedisCommandscommand - Command to executeargs - Possible command arguments (may be null)
public Object execute(String command,
String... args)
execute in interface StringRedisConnection
public Boolean pExpire(String key,
long millis)
pExpire in interface StringRedisConnection
public Boolean pExpireAt(String key,
long unixTimeInMillis)
pExpireAt in interface StringRedisConnectionpublic Long pTtl(String key)
pTtl in interface StringRedisConnectionpublic String scriptLoad(String script)
scriptLoad in interface StringRedisConnection
public <T> T eval(String script,
ReturnType returnType,
int numKeys,
String... keysAndArgs)
eval in interface StringRedisConnection
public <T> T evalSha(String scriptSha1,
ReturnType returnType,
int numKeys,
String... keysAndArgs)
evalSha in interface StringRedisConnectionpublic Long time()
RedisServerCommandsTIME command.
time in interface RedisServerCommandspublic List<RedisClientInfo> getClientList()
RedisServerCommands
getClientList in interface RedisServerCommandsgetClientList in interface StringRedisConnectionList of RedisClientInfo objects.RedisServerCommands.getClientList()
public void slaveOf(String host,
int port)
RedisServerCommands
slaveOf in interface RedisServerCommandshttp://redis.io/commands/slaveofpublic void slaveOfNoOne()
RedisServerCommands
slaveOfNoOne in interface RedisServerCommandshttp://redis.io/commands/slaveofpublic void setDeserializePipelineAndTxResults(boolean deserializePipelineAndTxResults)
closePipeline() and exec() will be of the type returned by the underlying connection
deserializePipelineAndTxResults - Whether or not to deserialize pipeline and tx resultspublic void setClientName(byte[] name)
RedisServerCommands
setClientName in interface RedisServerCommandspublic void setClientName(String name)
StringRedisConnectionname to connection using registered RedisSerializer for name conversion.
setClientName in interface StringRedisConnectionRedisServerCommands.setClientName(byte[])
public void killClient(String host,
int port)
RedisServerCommands
killClient in interface RedisServerCommandshost - of connection to close.port - of connection to closepublic String getClientName()
RedisServerCommands
getClientName in interface RedisServerCommandshttp://redis.io/commands/client-getname
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||