|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RedisKeyCommands
Key-specific commands supported by Redis.
Method Summary | |
---|---|
Long |
del(byte[]... keys)
Delete given keys . |
byte[] |
dump(byte[] key)
Retrieve serialized version of the value stored at key . |
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. |
Set<byte[]> |
keys(byte[] pattern)
Find all keys matching the given pattern . |
Boolean |
move(byte[] key,
int dbIndex)
Move given key to database with index . |
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 |
pTtl(byte[] key)
Get the time to live for key in milliseconds. |
byte[] |
randomKey()
Return a random key from the keyspace. |
void |
rename(byte[] oldName,
byte[] newName)
Rename key oleName to newName . |
Boolean |
renameNX(byte[] oldName,
byte[] newName)
Rename key oleName to newName only if newName does not exist. |
void |
restore(byte[] key,
long ttlInMillis,
byte[] serializedValue)
Create key using the serializedValue , previously obtained using dump(byte[]) . |
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 . |
Long |
ttl(byte[] key)
Get the time to live for key in seconds. |
DataType |
type(byte[] key)
Determine the type stored at key . |
Method Detail |
---|
Boolean exists(byte[] key)
key
exists.
key
-
http://redis.io/commands/exists
Long del(byte[]... keys)
keys
.
keys
-
http://redis.io/commands/del
DataType type(byte[] key)
key
.
key
-
http://redis.io/commands/type
Set<byte[]> keys(byte[] pattern)
pattern
.
pattern
-
http://redis.io/commands/keys
byte[] randomKey()
http://redis.io/commands/randomkey
void rename(byte[] oldName, byte[] newName)
oleName
to newName
.
oldName
- newName
- http://redis.io/commands/rename
Boolean renameNX(byte[] oldName, byte[] newName)
oleName
to newName
only if newName
does not exist.
oldName
- newName
-
http://redis.io/commands/renamenx
Boolean expire(byte[] key, long seconds)
key
in seconds.
key
- seconds
-
http://redis.io/commands/expire
Boolean pExpire(byte[] key, long millis)
key
in milliseconds.
key
- millis
-
http://redis.io/commands/pexpire
Boolean expireAt(byte[] key, long unixTime)
key
as a UNIX timestamp.
key
- unixTime
-
http://redis.io/commands/expireat
Boolean pExpireAt(byte[] key, long unixTimeInMillis)
key
as a UNIX timestamp in milliseconds.
key
- unixTimeInMillis
-
http://redis.io/commands/pexpireat
Boolean persist(byte[] key)
key
.
key
-
http://redis.io/commands/persist
Boolean move(byte[] key, int dbIndex)
key
to database with index
.
key
- dbIndex
-
http://redis.io/commands/move
Long ttl(byte[] key)
key
in seconds.
key
-
http://redis.io/commands/ttl
Long pTtl(byte[] key)
key
in milliseconds.
key
-
http://redis.io/commands/pttl
List<byte[]> sort(byte[] key, SortParameters params)
key
.
key
- params
-
http://redis.io/commands/sort
Long sort(byte[] key, SortParameters params, byte[] storeKey)
key
and store result in storeKey
.
key
- params
- storeKey
-
http://redis.io/commands/sort
byte[] dump(byte[] key)
key
.
key
-
http://redis.io/commands/dump
void restore(byte[] key, long ttlInMillis, byte[] serializedValue)
key
using the serializedValue
, previously obtained using dump(byte[])
.
key
- ttlInMillis
- serializedValue
- http://redis.io/commands/restore
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |