K
- Key type.V
- Value type.public interface NodeSelectionListCommands<K,V>
Modifier and Type | Method and Description |
---|---|
Executions<V> |
blmove(K source,
K destination,
LMoveArgs args,
double timeout)
Atomically returns and removes the first/last element (head/tail depending on the where from argument) of the list stored
at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list
stored at destination.
|
Executions<V> |
blmove(K source,
K destination,
LMoveArgs args,
long timeout)
Atomically returns and removes the first/last element (head/tail depending on the where from argument) of the list stored
at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list
stored at destination.
|
Executions<KeyValue<K,List<V>>> |
blmpop(double timeout,
LMPopArgs args,
K... keys)
Remove and get the first/last elements in a list, or block until one is available.
|
Executions<KeyValue<K,List<V>>> |
blmpop(long timeout,
LMPopArgs args,
K... keys)
Remove and get the first/last elements in a list, or block until one is available.
|
Executions<KeyValue<K,V>> |
blpop(double timeout,
K... keys)
Remove and get the first element in a list, or block until one is available.
|
Executions<KeyValue<K,V>> |
blpop(long timeout,
K... keys)
Remove and get the first element in a list, or block until one is available.
|
Executions<KeyValue<K,V>> |
brpop(double timeout,
K... keys)
Remove and get the last element in a list, or block until one is available.
|
Executions<KeyValue<K,V>> |
brpop(long timeout,
K... keys)
Remove and get the last element in a list, or block until one is available.
|
Executions<V> |
brpoplpush(double 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.
|
Executions<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.
|
Executions<V> |
lindex(K key,
long index)
Get an element from a list by its index.
|
Executions<Long> |
linsert(K key,
boolean before,
V pivot,
V value)
Insert an element before or after another element in a list.
|
Executions<Long> |
llen(K key)
Get the length of a list.
|
Executions<V> |
lmove(K source,
K destination,
LMoveArgs args)
Atomically returns and removes the first/last element (head/tail depending on the where from argument) of the list stored
at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list
stored at destination.
|
Executions<KeyValue<K,List<V>>> |
lmpop(LMPopArgs args,
K... keys)
Remove and get the first/last elements in a list.
|
Executions<V> |
lpop(K key)
Remove and get the first element in a list.
|
Executions<List<V>> |
lpop(K key,
long count)
Remove and get the first
count elements in a list. |
Executions<Long> |
lpos(K key,
V value)
Return the index of matching elements inside a Redis list.
|
Executions<List<Long>> |
lpos(K key,
V value,
int count)
Return the index of matching elements inside a Redis list using the
COUNT option. |
Executions<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. |
Executions<Long> |
lpos(K key,
V value,
LPosArgs args)
Return the index of matching elements inside a Redis list.
|
Executions<Long> |
lpush(K key,
V... values)
Prepend one or multiple values to a list.
|
Executions<Long> |
lpushx(K key,
V... values)
Prepend values to a list, only if the list exists.
|
Executions<List<V>> |
lrange(K key,
long start,
long stop)
Get a range of elements from a list.
|
Executions<Long> |
lrange(ValueStreamingChannel<V> channel,
K key,
long start,
long stop)
Get a range of elements from a list.
|
Executions<Long> |
lrem(K key,
long count,
V value)
Remove elements from a list.
|
Executions<String> |
lset(K key,
long index,
V value)
Set the value of an element in a list by its index.
|
Executions<String> |
ltrim(K key,
long start,
long stop)
Trim a list to the specified range.
|
Executions<V> |
rpop(K key)
Remove and get the last element in a list.
|
Executions<List<V>> |
rpop(K key,
long count)
Remove and get the last
count elements in a list. |
Executions<V> |
rpoplpush(K source,
K destination)
Remove the last element in a list, append it to another list and return it.
|
Executions<Long> |
rpush(K key,
V... values)
Append one or multiple values to a list.
|
Executions<Long> |
rpushx(K key,
V... values)
Append values to a list, only if the list exists.
|
Executions<V> blmove(K source, K destination, LMoveArgs args, long timeout)
source
- the source key.destination
- the destination type: key.args
- command arguments to configure source and destination directions.timeout
- the timeout in seconds.Executions<V> blmove(K source, K destination, LMoveArgs args, double timeout)
source
- the source key.destination
- the destination type: key.args
- command arguments to configure source and destination directions.timeout
- the timeout in seconds.Executions<KeyValue<K,List<V>>> blmpop(long timeout, LMPopArgs args, K... keys)
timeout
- the timeout in seconds.args
- the additional command arguments.keys
- the keys.null
when key
does not exist or the timeout was
exceeded.Executions<KeyValue<K,List<V>>> blmpop(double timeout, LMPopArgs args, K... keys)
timeout
- the timeout in seconds.args
- the additional command arguments.keys
- the keys.null
when key
does not exist or the timeout was
exceeded.Executions<KeyValue<K,V>> blpop(long timeout, K... keys)
timeout
- the timeout in seconds.keys
- the keys.null
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.Executions<KeyValue<K,V>> blpop(double timeout, K... keys)
timeout
- the timeout in seconds.keys
- the keys.null
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.Executions<KeyValue<K,V>> brpop(long timeout, K... keys)
timeout
- the timeout in seconds.keys
- the keys.null
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.Executions<KeyValue<K,V>> brpop(double timeout, K... keys)
timeout
- the timeout in seconds.keys
- the keys.null
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.Executions<V> brpoplpush(long timeout, K source, K destination)
timeout
- the timeout in seconds.source
- the source key.destination
- the destination type: key.source
and pushed to destination
. If
timeout
is reached, a.Executions<V> brpoplpush(double timeout, K source, K destination)
timeout
- the timeout in seconds.source
- the source key.destination
- the destination type: key.source
and pushed to destination
. If
timeout
is reached, a.Executions<V> lindex(K key, long index)
key
- the key.index
- the index type: long.null
when index
is out of range.Executions<Long> linsert(K key, boolean before, V pivot, V value)
key
- the key.before
- the before.pivot
- the pivot.value
- the value.-1
when the value pivot
was not found.Executions<Long> llen(K key)
key
- the key.key
.Executions<V> lmove(K source, K destination, LMoveArgs args)
source
- the source key.destination
- the destination type: key.args
- command arguments to configure source and destination directions.Executions<KeyValue<K,List<V>>> lmpop(LMPopArgs args, K... keys)
args
- the additional command arguments.keys
- the keys.null
when key
does not exist.Executions<V> lpop(K key)
key
- the key.null
when key
does not exist.Executions<List<V>> lpop(K key, long count)
count
elements in a list.key
- the key.count
- the number of elements to return.count
elements, or null
when key
does
not exist.Executions<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 key.value
- the element to search for.Executions<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 key.value
- the element to search for.args
- command arguments to configureFIRST
and MAXLEN
options.Executions<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 key.value
- the element to search for.count
- limit the number of matches.Executions<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 key.value
- the element to search for.count
- limit the number of matches.args
- command arguments to configureFIRST
and MAXLEN
options.Executions<Long> lpush(K key, V... values)
key
- the key.values
- the value.Executions<Long> lpushx(K key, V... values)
key
- the key.values
- the values.Executions<List<V>> lrange(K key, long start, long stop)
key
- the key.start
- the start type: long.stop
- the stop type: long.Executions<Long> lrange(ValueStreamingChannel<V> channel, K key, long start, long stop)
channel
- the channel.key
- the key.start
- the start type: long.stop
- the stop type: long.Executions<Long> lrem(K key, long count, V value)
key
- the key.count
- the count type: long.value
- the value.Executions<String> lset(K key, long index, V value)
key
- the key.index
- the index type: long.value
- the value.Executions<String> ltrim(K key, long start, long stop)
key
- the key.start
- the start type: long.stop
- the stop type: long.Executions<V> rpop(K key)
key
- the key.null
when key
does not exist.Executions<List<V>> rpop(K key, long count)
count
elements in a list.key
- the key.count
- the number of elements to return.count
elements, or null
when key
does not
exist.Executions<V> rpoplpush(K source, K destination)
source
- the source key.destination
- the destination type: key.Executions<Long> rpush(K key, V... values)
key
- the key.values
- the value.Executions<Long> rpushx(K key, V... values)
key
- the key.values
- the values.Copyright © 2023 lettuce.io. All rights reserved.