K
- Key type.V
- Value type.public interface NodeSelectionListCommands<K,V>
Modifier and Type | Method and Description |
---|---|
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(long timeout,
K... keys)
Remove and get the last element in a list, 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> |
lpop(K key)
Remove and get the first element in a 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<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<KeyValue<K,V>> blpop(long timeout, K... keys)
timeout
- the timeout in secondskeys
- the keysExecutions<KeyValue<K,V>> brpop(long timeout, K... keys)
timeout
- the timeout in secondskeys
- the keysExecutions<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, aExecutions<V> lindex(K key, long index)
key
- the keyindex
- the index type: longindex
is out of range.Executions<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.Executions<Long> llen(K key)
key
- the keykey
.Executions<V> lpop(K key)
key
- the keykey
does not exist.Executions<Long> lpush(K key, V... values)
key
- the keyvalues
- the valueExecutions<Long> lpushx(K key, V... values)
key
- the keyvalues
- the valuesExecutions<List<V>> lrange(K key, long start, long stop)
key
- the keystart
- the start type: longstop
- the stop type: longExecutions<Long> lrange(ValueStreamingChannel<V> channel, K key, long start, long stop)
channel
- the channelkey
- the keystart
- the start type: longstop
- the stop type: longExecutions<Long> lrem(K key, long count, V value)
key
- the keycount
- the count type: longvalue
- the valueExecutions<String> lset(K key, long index, V value)
key
- the keyindex
- the index type: longvalue
- the valueExecutions<String> ltrim(K key, long start, long stop)
key
- the keystart
- the start type: longstop
- the stop type: longExecutions<V> rpop(K key)
key
- the keykey
does not exist.Executions<V> rpoplpush(K source, K destination)
source
- the source keydestination
- the destination type: keyExecutions<Long> rpush(K key, V... values)
key
- the keyvalues
- the valueExecutions<Long> rpushx(K key, V... values)
key
- the keyvalues
- the valuesCopyright © 2018 lettuce.io. All rights reserved.