K
- Key type.V
- Value type.public interface RedisListAsyncCommands<K,V>
Modifier and Type | Method and Description |
---|---|
RedisFuture<KeyValue<K,V>> |
blpop(long timeout,
K... keys)
Remove and get the first element in a list, or block until one is available.
|
RedisFuture<KeyValue<K,V>> |
brpop(long timeout,
K... keys)
Remove and get the last element in a list, or block until one is available.
|
RedisFuture<V> |
brpoplpush(long timeout,
K source,
K destination)
Pop a value from a list, push it to another list and return it; or block until one is available.
|
RedisFuture<V> |
lindex(K key,
long index)
Get an element from a list by its index.
|
RedisFuture<Long> |
linsert(K key,
boolean before,
V pivot,
V value)
Insert an element before or after another element in a list.
|
RedisFuture<Long> |
llen(K key)
Get the length of a list.
|
RedisFuture<V> |
lpop(K key)
Remove and get the first element in a list.
|
RedisFuture<Long> |
lpos(K key,
V value)
Return the index of matching elements inside a Redis list.
|
RedisFuture<List<Long>> |
lpos(K key,
V value,
int count)
Return the index of matching elements inside a Redis list using the
COUNT option. |
RedisFuture<List<Long>> |
lpos(K key,
V value,
int count,
LPosArgs args)
Return the index of matching elements inside a Redis list using the
COUNT option. |
RedisFuture<Long> |
lpos(K key,
V value,
LPosArgs args)
Return the index of matching elements inside a Redis list.
|
RedisFuture<Long> |
lpush(K key,
V... values)
Prepend one or multiple values to a list.
|
RedisFuture<Long> |
lpushx(K key,
V... values)
Prepend values to a list, only if the list exists.
|
RedisFuture<List<V>> |
lrange(K key,
long start,
long stop)
Get a range of elements from a list.
|
RedisFuture<Long> |
lrange(ValueStreamingChannel<V> channel,
K key,
long start,
long stop)
Get a range of elements from a list.
|
RedisFuture<Long> |
lrem(K key,
long count,
V value)
Remove elements from a list.
|
RedisFuture<String> |
lset(K key,
long index,
V value)
Set the value of an element in a list by its index.
|
RedisFuture<String> |
ltrim(K key,
long start,
long stop)
Trim a list to the specified range.
|
RedisFuture<V> |
rpop(K key)
Remove and get the last element in a list.
|
RedisFuture<V> |
rpoplpush(K source,
K destination)
Remove the last element in a list, append it to another list and return it.
|
RedisFuture<Long> |
rpush(K key,
V... values)
Append one or multiple values to a list.
|
RedisFuture<Long> |
rpushx(K key,
V... values)
Append values to a list, only if the list exists.
|
RedisFuture<KeyValue<K,V>> blpop(long timeout, K... keys)
timeout
- the timeout in secondskeys
- the keysnull
multi-bulk when no element could be popped and the timeout expired. A two-element multi-bulk
with the first element being the name of the key where an element was popped and the second element being the
value of the popped element.RedisFuture<KeyValue<K,V>> brpop(long timeout, K... keys)
timeout
- the timeout in secondskeys
- the keysnull
multi-bulk when no element could be popped and the timeout expired. A two-element multi-bulk
with the first element being the name of the key where an element was popped and the second element being the
value of the popped element.RedisFuture<V> brpoplpush(long timeout, K source, K destination)
timeout
- the timeout in secondssource
- the source keydestination
- the destination type: keysource
and pushed to destination
. If
timeout
is reached, aRedisFuture<V> lindex(K key, long index)
key
- the keyindex
- the index type: longnull
when index
is out of range.RedisFuture<Long> linsert(K key, boolean before, V pivot, V value)
key
- the keybefore
- the beforepivot
- the pivotvalue
- the value-1
when the value pivot
was not found.RedisFuture<Long> llen(K key)
key
- the keykey
.RedisFuture<V> lpop(K key)
key
- the keynull
when key
does not exist.RedisFuture<Long> lpos(K key, V value)
null
is returned. The returned elements indexes are
always referring to what lindex(java.lang.Object, long)
would return. So first element from head is 0
,
and so forth.key
- the keyvalue
- the element to search forRedisFuture<Long> lpos(K key, V value, LPosArgs args)
null
is returned. The returned elements indexes are
always referring to what lindex(java.lang.Object, long)
would return. So first element from head is 0
,
and so forth.key
- the keyvalue
- the element to search forargs
- command arguments to configureFIRST
and MAXLEN
optionsRedisFuture<List<Long>> lpos(K key, V value, int count)
COUNT
option. By default, when no options are
given, it will scan the list from head to tail, looking for the first match of "element". The returned elements indexes
are always referring to what lindex(java.lang.Object, long)
would return. So first element from head is
0
, and so forth.key
- the keyvalue
- the element to search forcount
- limit the number of matchesRedisFuture<List<Long>> lpos(K key, V value, int count, LPosArgs args)
COUNT
option. By default, when no options are
given, it will scan the list from head to tail, looking for the first match of "element". The returned elements indexes
are always referring to what lindex(java.lang.Object, long)
would return. So first element from head is
0
, and so forth.key
- the keyvalue
- the element to search forcount
- limit the number of matchesargs
- command arguments to configureFIRST
and MAXLEN
optionsRedisFuture<Long> lpush(K key, V... values)
key
- the keyvalues
- the valueRedisFuture<Long> lpushx(K key, V... values)
key
- the keyvalues
- the valuesRedisFuture<List<V>> lrange(K key, long start, long stop)
key
- the keystart
- the start type: longstop
- the stop type: longRedisFuture<Long> lrange(ValueStreamingChannel<V> channel, K key, long start, long stop)
channel
- the channelkey
- the keystart
- the start type: longstop
- the stop type: longRedisFuture<Long> lrem(K key, long count, V value)
key
- the keycount
- the count type: longvalue
- the valueRedisFuture<String> lset(K key, long index, V value)
key
- the keyindex
- the index type: longvalue
- the valueRedisFuture<String> ltrim(K key, long start, long stop)
key
- the keystart
- the start type: longstop
- the stop type: longRedisFuture<V> rpop(K key)
key
- the keynull
when key
does not exist.RedisFuture<V> rpoplpush(K source, K destination)
source
- the source keydestination
- the destination type: keyRedisFuture<Long> rpush(K key, V... values)
key
- the keyvalues
- the valueRedisFuture<Long> rpushx(K key, V... values)
key
- the keyvalues
- the valuesCopyright © 2021 lettuce.io. All rights reserved.