public interface BoundListOperations<K,V> extends BoundKeyOperations<K>
| Modifier and Type | Method and Description |
|---|---|
RedisOperations<K,V> |
getOperations() |
V |
index(long index)
Get element at
index form list at the bound key. |
Long |
indexOf(V value)
Returns the index of the first occurrence of the specified value in the list at at
key. |
Long |
lastIndexOf(V value)
Returns the index of the last occurrence of the specified value in the list at at
key. |
V |
leftPop()
Removes and returns first element in list stored at the bound key.
|
default V |
leftPop(Duration timeout)
Removes and returns first element from lists stored at the bound key .
|
List<V> |
leftPop(long count)
Removes and returns first elements in list stored at
key. |
V |
leftPop(long timeout,
TimeUnit unit)
Removes and returns first element from lists stored at the bound key .
|
Long |
leftPush(V value)
Prepend
value to the bound key. |
Long |
leftPush(V pivot,
V value)
Prepend
values to the bound key before value. |
Long |
leftPushAll(V... values)
Prepend
values to the bound key. |
Long |
leftPushIfPresent(V value)
Prepend
values to the bound key only if the list exists. |
V |
move(RedisListCommands.Direction from,
K destinationKey,
RedisListCommands.Direction to)
Atomically returns and removes the first/last element (head/tail depending on the
from argument) of the
list stored at the bound key, and pushes the element at the first/last element (head/tail depending on the
to argument) of the list stored at destinationKey. |
V |
move(RedisListCommands.Direction from,
K destinationKey,
RedisListCommands.Direction to,
Duration timeout)
Atomically returns and removes the first/last element (head/tail depending on the
from argument) of the
list stored at the bound key, and pushes the element at the first/last element (head/tail depending on the
to argument) of the list stored at destinationKey. |
V |
move(RedisListCommands.Direction from,
K destinationKey,
RedisListCommands.Direction to,
long timeout,
TimeUnit unit)
Atomically returns and removes the first/last element (head/tail depending on the
from argument) of the
list stored at the bound key, and pushes the element at the first/last element (head/tail depending on the
to argument) of the list stored at destinationKey. |
List<V> |
range(long start,
long end)
Get elements between
begin and end from list at the bound key. |
Long |
remove(long count,
Object value)
Removes the first
count occurrences of value from the list stored at the bound key. |
V |
rightPop()
Removes and returns last element in list stored at the bound key.
|
default V |
rightPop(Duration timeout)
Removes and returns last element from lists stored at the bound key.
|
List<V> |
rightPop(long count)
Removes and returns last elements in list stored at
key. |
V |
rightPop(long timeout,
TimeUnit unit)
Removes and returns last element from lists stored at the bound key.
|
Long |
rightPush(V value)
Append
value to the bound key. |
Long |
rightPush(V pivot,
V value)
Append
values to the bound key before value. |
Long |
rightPushAll(V... values)
Append
values to the bound key. |
Long |
rightPushIfPresent(V value)
Append
values to the bound key only if the list exists. |
void |
set(long index,
V value)
Set the
value list element at index. |
Long |
size()
Get the size of list stored at the bound key.
|
void |
trim(long start,
long end)
Trim list at the bound key to elements between
start and end. |
@Nullable List<V> range(long start, long end)
begin and end from list at the bound key.start - end - void trim(long start,
long end)
start and end.start - end - @Nullable Long size()
@Nullable Long leftPush(V value)
value to the bound key.value - @Nullable Long leftPushAll(V... values)
values to the bound key.values - @Nullable Long leftPushIfPresent(V value)
values to the bound key only if the list exists.value - @Nullable Long leftPush(V pivot, V value)
values to the bound key before value.value - @Nullable Long rightPush(V value)
value to the bound key.value - @Nullable Long rightPushAll(V... values)
values to the bound key.values - @Nullable Long rightPushIfPresent(V value)
values to the bound key only if the list exists.value - @Nullable Long rightPush(V pivot, V value)
values to the bound key before value.value - @Nullable V move(RedisListCommands.Direction from, K destinationKey, RedisListCommands.Direction to)
from argument) of the
list stored at the bound key, and pushes the element at the first/last element (head/tail depending on the
to argument) of the list stored at destinationKey.from - must not be null.destinationKey - must not be null.to - must not be null.@Nullable V move(RedisListCommands.Direction from, K destinationKey, RedisListCommands.Direction to, Duration timeout)
from argument) of the
list stored at the bound key, and pushes the element at the first/last element (head/tail depending on the
to argument) of the list stored at destinationKey.
Blocks connection until element available or timeout reached.
from - must not be null.destinationKey - must not be null.to - must not be null.timeout - @Nullable V move(RedisListCommands.Direction from, K destinationKey, RedisListCommands.Direction to, long timeout, TimeUnit unit)
from argument) of the
list stored at the bound key, and pushes the element at the first/last element (head/tail depending on the
to argument) of the list stored at destinationKey.
Blocks connection until element available or timeout reached.
from - must not be null.destinationKey - must not be null.to - must not be null.timeout - unit - void set(long index,
V value)
value list element at index.index - value - @Nullable Long remove(long count, Object value)
count occurrences of value from the list stored at the bound key.count - value - @Nullable V index(long index)
index form list at the bound key.index - Long indexOf(V value)
key. value - must not be null.Long lastIndexOf(V value)
key. value - must not be null.@Nullable V leftPop()
@Nullable List<V> leftPop(long count)
key.count - @Nullable V leftPop(long timeout, TimeUnit unit)
timeout reached.timeout - unit - must not be null.@Nullable default V leftPop(Duration timeout)
timeout reached.timeout - must not be null.IllegalArgumentException - if the timeout is null or negative.@Nullable V rightPop()
@Nullable List<V> rightPop(long count)
key.count - @Nullable V rightPop(long timeout, TimeUnit unit)
timeout reached.timeout - unit - must not be null.@Nullable default V rightPop(Duration timeout)
timeout reached.timeout - must not be null.IllegalArgumentException - if the timeout is null or negative.RedisOperations<K,V> getOperations()
Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.