public interface RedisListCommands
| Modifier and Type | Interface and Description |
|---|---|
static class |
RedisListCommands.Position
List insertion position.
|
| Modifier and Type | Method and Description |
|---|---|
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[]... 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. |
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 rPush(byte[] key, byte[]... values)
values to key.
See http://redis.io/commands/rpush
key - values - Long lPush(byte[] key, byte[]... values)
values to key.
See http://redis.io/commands/lpush
key - values - Long rPushX(byte[] key, byte[] value)
values to key only if the list exists.
See http://redis.io/commands/rpushx
key - value - Long lPushX(byte[] key, byte[] value)
values to key only if the list exists.
See http://redis.io/commands/lpushx
key - value - Long lLen(byte[] key)
key.
See http://redis.io/commands/llen
key - List<byte[]> lRange(byte[] key, long begin, long end)
begin and end from list at key.
See http://redis.io/commands/lrange
key - begin - end - void lTrim(byte[] key,
long begin,
long end)
key to elements between begin and end.
See http://redis.io/commands/ltrim
key - begin - end - byte[] lIndex(byte[] key,
long index)
index form list at key.
See http://redis.io/commands/lindex
key - index - Long lInsert(byte[] key, RedisListCommands.Position where, byte[] pivot, byte[] value)
value RedisListCommands.Position.BEFORE or RedisListCommands.Position.AFTER existing pivot for key.
See http://redis.io/commands/linsert
key - where - pivot - value - void lSet(byte[] key,
long index,
byte[] value)
value list element at index.
See http://redis.io/commands/lset
key - index - value - Long lRem(byte[] key, long count, byte[] value)
count occurrences of value from the list stored at key.
See http://redis.io/commands/lrem
key - count - value - byte[] lPop(byte[] key)
key.
See http://redis.io/commands/lpop
key - byte[] rPop(byte[] key)
key.
See http://redis.io/commands/rpop
key - List<byte[]> bLPop(int timeout, byte[]... keys)
keys (see: lPop(byte[])). timeout reached.
See http://redis.io/commands/blpop
timeout - keys - List<byte[]> bRPop(int timeout, byte[]... keys)
keys (see: rPop(byte[])). timeout reached.
See http://redis.io/commands/brpop
timeout - keys - byte[] rPopLPush(byte[] srcKey,
byte[] dstKey)
srcKey, append it to dstKey and return its value.
See http://redis.io/commands/rpoplpush
srcKey - dstKey - byte[] bRPopLPush(int timeout,
byte[] srcKey,
byte[] dstKey)
srcKey, append it to dstKey and return its value (see
rPopLPush(byte[], byte[])). timeout reached.
See http://redis.io/commands/brpoplpush
timeout - srcKey - dstKey -