|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RedisListCommands
List-specific commands supported by Redis.
Nested Class Summary | |
---|---|
static class |
RedisListCommands.Position
List insertion position. |
Method Summary | |
---|---|
List<byte[]> |
bLPop(int timeout,
byte[]... keys)
Removes and returns first element from lists stored at keys (see: lPop(byte[]) ). |
List<byte[]> |
bRPop(int timeout,
byte[]... keys)
Removes and returns last element from lists stored at keys (see: 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
rPopLPush(byte[], byte[]) ). |
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[]... value)
Prepend values to key . |
Long |
lPushX(byte[] key,
byte[] value)
Prepend values to key only if the list exits. |
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 . |
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. |
Method Detail |
---|
Long rPush(byte[] key, byte[]... values)
values
to key
.
key
- values
-
http://redis.io/commands/rpush
Long lPush(byte[] key, byte[]... value)
values
to key
.
key
- value
-
http://redis.io/commands/lpush
Long rPushX(byte[] key, byte[] value)
values to key
only if the list exists.
key
- values
-
http://redis.io/commands/rpushx
Long lPushX(byte[] key, byte[] value)
values
to key
only if the list exits.
key
- value
-
http://redis.io/commands/lpushx
Long lLen(byte[] key)
key
.
key
-
http://redis.io/commands/llen
List<byte[]> lRange(byte[] key, long begin, long end)
begin
and end
from list at key
.
key
- begin
- end
-
http://redis.io/commands/lrange
void lTrim(byte[] key, long begin, long end)
key
to elements between begin
and end
.
key
- begin
- end
- http://redis.io/commands/ltrim
byte[] lIndex(byte[] key, long index)
index
form list at key
.
key
- index
-
http://redis.io/commands/lindex
Long lInsert(byte[] key, RedisListCommands.Position where, byte[] pivot, byte[] value)
value
RedisListCommands.Position.BEFORE
or RedisListCommands.Position.AFTER
existing pivot
for key
.
key
- where
- pivot
- value
-
http://redis.io/commands/linsert
void lSet(byte[] key, long index, byte[] value)
value
list element at index
.
key
- index
- value
- http://redis.io/commands/lset
Long lRem(byte[] key, long count, byte[] value)
count
occurrences of value
from the list stored at key
.
key
- count
- value
-
http://redis.io/commands/lrem
byte[] lPop(byte[] key)
key
.
key
-
http://redis.io/commands/lpop
byte[] rPop(byte[] key)
key
.
key
-
http://redis.io/commands/rpop
List<byte[]> bLPop(int timeout, byte[]... keys)
keys
(see: lPop(byte[])
). timeout
reached.
timeout
- keys
-
http://redis.io/commands/blpop
List<byte[]> bRPop(int timeout, byte[]... keys)
keys
(see: rPop(byte[])
). timeout
reached.
timeout
- keys
-
http://redis.io/commands/brpop
byte[] rPopLPush(byte[] srcKey, byte[] dstKey)
srcKey
, append it to dstKey
and return its value.
srcKey
- dstKey
-
http://redis.io/commands/rpoplpush
byte[] bRPopLPush(int timeout, byte[] srcKey, byte[] dstKey)
srcKey
, append it to dstKey
and return its value (see
rPopLPush(byte[], byte[])
). timeout
reached.
timeout
- srcKey
- dstKey
-
http://redis.io/commands/brpoplpush
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |