public class DefaultReactiveListOperations<K,V> extends Object implements ReactiveListOperations<K,V>
ReactiveListOperations
.Constructor and Description |
---|
DefaultReactiveListOperations(ReactiveRedisTemplate<?,?> template,
RedisSerializationContext<K,V> serializationContext)
Create new instance of
DefaultReactiveListOperations . |
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<Boolean> |
delete(K key)
Removes the given key.
|
reactor.core.publisher.Mono<V> |
index(K key,
long index)
Get element at
index form list at key . |
reactor.core.publisher.Mono<V> |
leftPop(K key)
Removes and returns first element in list stored at
key . |
reactor.core.publisher.Mono<V> |
leftPop(K key,
Duration timeout)
Removes and returns first element from lists stored at
key . |
reactor.core.publisher.Mono<Long> |
leftPush(K key,
V value)
Prepend
value to key . |
reactor.core.publisher.Mono<Long> |
leftPush(K key,
V pivot,
V value)
Prepend
values to key before value . |
reactor.core.publisher.Mono<Long> |
leftPushAll(K key,
Collection<V> values)
Prepend
values to key . |
reactor.core.publisher.Mono<Long> |
leftPushAll(K key,
V... values)
Prepend
values to key . |
reactor.core.publisher.Mono<Long> |
leftPushIfPresent(K key,
V value)
Prepend
values to key only if the list exists. |
reactor.core.publisher.Flux<V> |
range(K key,
long start,
long end)
Get elements between
begin and end from list at key . |
reactor.core.publisher.Mono<Long> |
remove(K key,
long count,
Object value)
Removes the first
count occurrences of value from the list stored at key . |
reactor.core.publisher.Mono<V> |
rightPop(K key)
Removes and returns last element in list stored at
key . |
reactor.core.publisher.Mono<V> |
rightPop(K key,
Duration timeout)
Removes and returns last element from lists stored at
key . |
reactor.core.publisher.Mono<V> |
rightPopAndLeftPush(K sourceKey,
K destinationKey)
Remove the last element from list at
sourceKey , append it to destinationKey and return its value. |
reactor.core.publisher.Mono<V> |
rightPopAndLeftPush(K sourceKey,
K destinationKey,
Duration timeout)
Remove the last element from list at
srcKey , append it to dstKey and return its value. |
reactor.core.publisher.Mono<Long> |
rightPush(K key,
V value)
Append
value to key . |
reactor.core.publisher.Mono<Long> |
rightPush(K key,
V pivot,
V value)
Append
values to key before value . |
reactor.core.publisher.Mono<Long> |
rightPushAll(K key,
Collection<V> values)
Append
values to key . |
reactor.core.publisher.Mono<Long> |
rightPushAll(K key,
V... values)
Append
values to key . |
reactor.core.publisher.Mono<Long> |
rightPushIfPresent(K key,
V value)
Append
values to key only if the list exists. |
reactor.core.publisher.Mono<Boolean> |
set(K key,
long index,
V value)
Set the
value list element at index . |
reactor.core.publisher.Mono<Long> |
size(K key)
Get the size of list stored at
key . |
reactor.core.publisher.Mono<Boolean> |
trim(K key,
long start,
long end)
Trim list at
key to elements between start and end . |
public DefaultReactiveListOperations(ReactiveRedisTemplate<?,?> template, RedisSerializationContext<K,V> serializationContext)
DefaultReactiveListOperations
.template
- must not be null.serializationContext
- must not be null.public reactor.core.publisher.Flux<V> range(K key, long start, long end)
ReactiveListOperations
begin
and end
from list at key
.range
in interface ReactiveListOperations<K,V>
key
- must not be null.public reactor.core.publisher.Mono<Boolean> trim(K key, long start, long end)
ReactiveListOperations
key
to elements between start
and end
.trim
in interface ReactiveListOperations<K,V>
key
- must not be null.public reactor.core.publisher.Mono<Long> size(K key)
ReactiveListOperations
key
.size
in interface ReactiveListOperations<K,V>
key
- must not be null.public reactor.core.publisher.Mono<Long> leftPush(K key, V value)
ReactiveListOperations
value
to key
.leftPush
in interface ReactiveListOperations<K,V>
key
- must not be null.@SafeVarargs public final reactor.core.publisher.Mono<Long> leftPushAll(K key, V... values)
ReactiveListOperations
values
to key
.leftPushAll
in interface ReactiveListOperations<K,V>
key
- must not be null.public reactor.core.publisher.Mono<Long> leftPushAll(K key, Collection<V> values)
ReactiveListOperations
values
to key
.leftPushAll
in interface ReactiveListOperations<K,V>
key
- must not be null.values
- must not be null.public reactor.core.publisher.Mono<Long> leftPushIfPresent(K key, V value)
ReactiveListOperations
values
to key
only if the list exists.leftPushIfPresent
in interface ReactiveListOperations<K,V>
key
- must not be null.public reactor.core.publisher.Mono<Long> leftPush(K key, V pivot, V value)
ReactiveListOperations
values
to key
before value
.leftPush
in interface ReactiveListOperations<K,V>
key
- must not be null.public reactor.core.publisher.Mono<Long> rightPush(K key, V value)
ReactiveListOperations
value
to key
.rightPush
in interface ReactiveListOperations<K,V>
key
- must not be null.@SafeVarargs public final reactor.core.publisher.Mono<Long> rightPushAll(K key, V... values)
ReactiveListOperations
values
to key
.rightPushAll
in interface ReactiveListOperations<K,V>
key
- must not be null.public reactor.core.publisher.Mono<Long> rightPushAll(K key, Collection<V> values)
ReactiveListOperations
values
to key
.rightPushAll
in interface ReactiveListOperations<K,V>
key
- must not be null.public reactor.core.publisher.Mono<Long> rightPushIfPresent(K key, V value)
ReactiveListOperations
values
to key
only if the list exists.rightPushIfPresent
in interface ReactiveListOperations<K,V>
key
- must not be null.public reactor.core.publisher.Mono<Long> rightPush(K key, V pivot, V value)
ReactiveListOperations
values
to key
before value
.rightPush
in interface ReactiveListOperations<K,V>
key
- must not be null.public reactor.core.publisher.Mono<Boolean> set(K key, long index, V value)
ReactiveListOperations
value
list element at index
.set
in interface ReactiveListOperations<K,V>
key
- must not be null.public reactor.core.publisher.Mono<Long> remove(K key, long count, Object value)
ReactiveListOperations
count
occurrences of value
from the list stored at key
.remove
in interface ReactiveListOperations<K,V>
key
- must not be null.public reactor.core.publisher.Mono<V> index(K key, long index)
ReactiveListOperations
index
form list at key
.index
in interface ReactiveListOperations<K,V>
key
- must not be null.public reactor.core.publisher.Mono<V> leftPop(K key)
ReactiveListOperations
key
.leftPop
in interface ReactiveListOperations<K,V>
key
- must not be null.public reactor.core.publisher.Mono<V> leftPop(K key, Duration timeout)
ReactiveListOperations
key
. timeout
reached.leftPop
in interface ReactiveListOperations<K,V>
key
- must not be null.timeout
- maximal duration to wait until an entry in the list at key
is available. Must be either
Duration.ZERO
or greater second
, must not be null. A timeout of zero can be
used to wait indefinitely. Durations between zero and one second are not supported.public reactor.core.publisher.Mono<V> rightPop(K key)
ReactiveListOperations
key
.rightPop
in interface ReactiveListOperations<K,V>
key
- must not be null.public reactor.core.publisher.Mono<V> rightPop(K key, Duration timeout)
ReactiveListOperations
key
. timeout
reached.rightPop
in interface ReactiveListOperations<K,V>
key
- must not be null.timeout
- maximal duration to wait until an entry in the list at key
is available. Must be either
Duration.ZERO
or greater second
, must not be null. A timeout of zero can be
used to wait indefinitely. Durations between zero and one second are not supported.public reactor.core.publisher.Mono<V> rightPopAndLeftPush(K sourceKey, K destinationKey)
ReactiveListOperations
sourceKey
, append it to destinationKey
and return its value.rightPopAndLeftPush
in interface ReactiveListOperations<K,V>
sourceKey
- must not be null.destinationKey
- must not be null.public reactor.core.publisher.Mono<V> rightPopAndLeftPush(K sourceKey, K destinationKey, Duration timeout)
ReactiveListOperations
srcKey
, append it to dstKey
and return its value.timeout
reached.rightPopAndLeftPush
in interface ReactiveListOperations<K,V>
sourceKey
- must not be null.destinationKey
- must not be null.timeout
- maximal duration to wait until an entry in the list at sourceKey
is available. Must be
either Duration.ZERO
or greater second
, must not be null. A timeout of zero
can be used to wait indefinitely. Durations between zero and one second are not supported.public reactor.core.publisher.Mono<Boolean> delete(K key)
ReactiveListOperations
delete
in interface ReactiveListOperations<K,V>
key
- must not be null.Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.