public interface ListOperations<K,V>
| Modifier and Type | Method and Description |
|---|---|
RedisOperations<K,V> |
getOperations() |
V |
index(K key,
long index)
Get element at
index form list at key. |
V |
leftPop(K key)
Removes and returns first element in list stored at
key. |
V |
leftPop(K key,
long timeout,
TimeUnit unit)
Removes and returns first element from lists stored at
key . |
Long |
leftPush(K key,
V value)
Prepend
value to key. |
Long |
leftPush(K key,
V pivot,
V value)
Prepend
values to key before value. |
Long |
leftPushAll(K key,
Collection<V> values)
Prepend
values to key. |
Long |
leftPushAll(K key,
V... values)
Prepend
values to key. |
Long |
leftPushIfPresent(K key,
V value)
Prepend
values to key only if the list exists. |
List<V> |
range(K key,
long start,
long end)
Get elements between
begin and end from list at key. |
Long |
remove(K key,
long count,
Object value)
Removes the first
count occurrences of value from the list stored at key. |
V |
rightPop(K key)
Removes and returns last element in list stored at
key. |
V |
rightPop(K key,
long timeout,
TimeUnit unit)
Removes and returns last element from lists stored at
key. |
V |
rightPopAndLeftPush(K sourceKey,
K destinationKey)
Remove the last element from list at
sourceKey, append it to destinationKey and return its value. |
V |
rightPopAndLeftPush(K sourceKey,
K destinationKey,
long timeout,
TimeUnit unit)
Remove the last element from list at
srcKey, append it to dstKey and return its value. |
Long |
rightPush(K key,
V value)
Append
value to key. |
Long |
rightPush(K key,
V pivot,
V value)
Append
values to key before value. |
Long |
rightPushAll(K key,
Collection<V> values)
Append
values to key. |
Long |
rightPushAll(K key,
V... values)
Append
values to key. |
Long |
rightPushIfPresent(K key,
V value)
Append
values to key only if the list exists. |
void |
set(K key,
long index,
V value)
Set the
value list element at index. |
Long |
size(K key)
Get the size of list stored at
key. |
void |
trim(K key,
long start,
long end)
Trim list at
key to elements between start and end. |
@Nullable List<V> range(K key, long start, long end)
begin and end from list at key.key - must not be null.start - end - void trim(K key, long start, long end)
key to elements between start and end.key - must not be null.start - end - @Nullable Long size(K key)
key.key - must not be null.@Nullable Long leftPush(K key, V value)
value to key.key - must not be null.value - @Nullable Long leftPushAll(K key, V... values)
values to key.key - must not be null.values - @Nullable Long leftPushAll(K key, Collection<V> values)
values to key.key - must not be null.values - must not be null.@Nullable Long leftPushIfPresent(K key, V value)
values to key only if the list exists.key - must not be null.value - @Nullable Long leftPush(K key, V pivot, V value)
values to key before value.key - must not be null.value - @Nullable Long rightPush(K key, V value)
value to key.key - must not be null.value - @Nullable Long rightPushAll(K key, V... values)
values to key.key - must not be null.values - @Nullable Long rightPushAll(K key, Collection<V> values)
values to key.key - must not be null.values - @Nullable Long rightPushIfPresent(K key, V value)
values to key only if the list exists.key - must not be null.value - @Nullable Long rightPush(K key, V pivot, V value)
values to key before value.key - must not be null.value - void set(K key, long index, V value)
value list element at index.key - must not be null.index - value - @Nullable Long remove(K key, long count, Object value)
count occurrences of value from the list stored at key.key - must not be null.count - value - @Nullable V index(K key, long index)
index form list at key.key - must not be null.index - @Nullable V leftPop(K key)
key.key - must not be null.@Nullable V leftPop(K key, long timeout, TimeUnit unit)
key . timeout reached.key - must not be null.timeout - unit - must not be null.@Nullable V rightPop(K key)
key.key - must not be null.@Nullable V rightPop(K key, long timeout, TimeUnit unit)
key. timeout reached.key - must not be null.timeout - unit - must not be null.@Nullable V rightPopAndLeftPush(K sourceKey, K destinationKey)
sourceKey, append it to destinationKey and return its value.sourceKey - must not be null.destinationKey - must not be null.@Nullable V rightPopAndLeftPush(K sourceKey, K destinationKey, long timeout, TimeUnit unit)
srcKey, append it to dstKey and return its value.timeout reached.sourceKey - must not be null.destinationKey - must not be null.timeout - unit - must not be null.RedisOperations<K,V> getOperations()
Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.