Interface ReactiveListCommands
- All Known Subinterfaces:
ReactiveClusterListCommands
public interface ReactiveListCommands
Redis List commands executed using reactive infrastructure.
- Since:
- 2.0
- Author:
- Christoph Strobl, Mark Paluch, dengliming
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
BLMOVE
command parameters.static class
static class
BRPOPLPUSH
command parameters.static enum
static class
LINDEX
command parameters.static class
LINSERT
command parameters.static class
LMOVE
command parameters.static class
LPOS
command parameters.static class
LREM
command parameters.static class
LSET
command parameters.static class
LPOP
/RPOP command parameters.static class
static class
static class
LPUSH
/RPUSH command parameters.static class
RPOPLPUSH
command parameters. -
Method Summary
Modifier and TypeMethodDescriptiondefault reactor.core.publisher.Mono<ByteBuffer>
bLMove
(ByteBuffer sourceKey, ByteBuffer destinationKey, ReactiveListCommands.Direction from, ReactiveListCommands.Direction to, Duration timeout) Atomically returns and removes the first/last element (head/tail depending on thefrom
argument) of the list stored atsourceKey
, and pushes the element at the first/last element (head/tail depending on theto
argument) of the list stored atdestinationKey
.reactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.BLMoveCommand>>
bLMove
(org.reactivestreams.Publisher<ReactiveListCommands.BLMoveCommand> commands) Atomically returns and removes the first/last element (head/tail depending on thefrom
argument) of the list stored atsourceKey
, and pushes the element at the first/last element (head/tail depending on theto
argument) of the list stored atdestinationKey
.default reactor.core.publisher.Mono<ReactiveListCommands.PopResult>
blPop
(List<ByteBuffer> keys, Duration timeout) Removes and returns first element from lists stored at keys.reactor.core.publisher.Flux<ReactiveListCommands.PopResponse>
bPop
(org.reactivestreams.Publisher<ReactiveListCommands.BPopCommand> commands) Removes and returns the topReactiveListCommands.BPopCommand.getDirection()
element from lists stored atReactiveListCommands.BPopCommand.getKeys()
.
Blocks connection until element available orReactiveListCommands.BPopCommand.getTimeout()
reached.default reactor.core.publisher.Mono<ReactiveListCommands.PopResult>
brPop
(List<ByteBuffer> keys, Duration timeout) Removes and returns last element from lists stored at keys.default reactor.core.publisher.Mono<ByteBuffer>
bRPopLPush
(ByteBuffer source, ByteBuffer destination, Duration timeout) Remove the last element from list at source, append it to destination and return its value.reactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.BRPopLPushCommand>>
bRPopLPush
(org.reactivestreams.Publisher<ReactiveListCommands.BRPopLPushCommand> commands) Remove the last element from list atReactiveRedisConnection.KeyCommand.getKey()
, append it toReactiveListCommands.BRPopLPushCommand.getDestination()
and return its value.default reactor.core.publisher.Mono<ByteBuffer>
lIndex
(ByteBuffer key, long index) Get element at index form list at key.reactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.LIndexCommand>>
lIndex
(org.reactivestreams.Publisher<ReactiveListCommands.LIndexCommand> commands) Get element atReactiveListCommands.LIndexCommand.getIndex()
form list atReactiveRedisConnection.KeyCommand.getKey()
.default reactor.core.publisher.Mono<Long>
lInsert
(ByteBuffer key, RedisListCommands.Position position, ByteBuffer pivot, ByteBuffer value) Insert valueRedisListCommands.Position.BEFORE
orRedisListCommands.Position.AFTER
existing pivot for key.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveListCommands.LInsertCommand,
Long>> lInsert
(org.reactivestreams.Publisher<ReactiveListCommands.LInsertCommand> commands) default reactor.core.publisher.Mono<Long>
lLen
(ByteBuffer key) Get the size of list stored at key.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,
Long>> lLen
(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands) Get the size of list stored atReactiveRedisConnection.KeyCommand.getKey()
default reactor.core.publisher.Mono<ByteBuffer>
lMove
(ByteBuffer sourceKey, ByteBuffer destinationKey, ReactiveListCommands.Direction from, ReactiveListCommands.Direction to) Atomically returns and removes the first/last element (head/tail depending on thefrom
argument) of the list stored atsourceKey
, and pushes the element at the first/last element (head/tail depending on theto
argument) of the list stored atdestinationKey
.reactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.LMoveCommand>>
lMove
(org.reactivestreams.Publisher<? extends ReactiveListCommands.LMoveCommand> commands) Atomically returns and removes the first/last element (head/tail depending on thefrom
argument) of the list stored atsourceKey
, and pushes the element at the first/last element (head/tail depending on theto
argument) of the list stored atdestinationKey
.default reactor.core.publisher.Mono<ByteBuffer>
lPop
(ByteBuffer key) Removes and returns first element in list stored at key.default reactor.core.publisher.Flux<ByteBuffer>
lPop
(ByteBuffer key, long count) Removes and returns firstcount
elements in list stored at key.default reactor.core.publisher.Mono<Long>
lPos
(ByteBuffer key, ByteBuffer element) Get first index of the element from list at key.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveListCommands.LPosCommand,
Long>> lPos
(org.reactivestreams.Publisher<ReactiveListCommands.LPosCommand> commands) Get indices of the element from list atReactiveRedisConnection.KeyCommand.getKey()
.default reactor.core.publisher.Flux<Long>
lPos
(ReactiveListCommands.LPosCommand command) Get indices of the element from list atReactiveRedisConnection.KeyCommand.getKey()
.default reactor.core.publisher.Mono<Long>
lPush
(ByteBuffer key, List<ByteBuffer> values) Prepend values to key.default reactor.core.publisher.Mono<Long>
lPushX
(ByteBuffer key, ByteBuffer value) Prepend value to key if key already exists.default reactor.core.publisher.Flux<ByteBuffer>
lRange
(ByteBuffer key, long start, long end) Get elements between start and end from list at key.reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveRedisConnection.RangeCommand,
reactor.core.publisher.Flux<ByteBuffer>>> lRange
(org.reactivestreams.Publisher<ReactiveRedisConnection.RangeCommand> commands) Get elements inReactiveRedisConnection.RangeCommand.getRange()
from list atReactiveRedisConnection.KeyCommand.getKey()
default reactor.core.publisher.Mono<Long>
lRem
(ByteBuffer key, Long count, ByteBuffer value) Removes the first count occurrences of value from the list stored at key.default reactor.core.publisher.Mono<Long>
lRem
(ByteBuffer key, ByteBuffer value) Removes all occurrences of value from the list stored at key.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveListCommands.LRemCommand,
Long>> lRem
(org.reactivestreams.Publisher<ReactiveListCommands.LRemCommand> commands) Removes theReactiveListCommands.LRemCommand.getCount()
occurrences ofReactiveListCommands.LRemCommand.getValue()
from the list stored atReactiveRedisConnection.KeyCommand.getKey()
.default reactor.core.publisher.Mono<Boolean>
lSet
(ByteBuffer key, long index, ByteBuffer value) Set the value list element at index.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveListCommands.LSetCommand>>
lSet
(org.reactivestreams.Publisher<ReactiveListCommands.LSetCommand> commands) Set theReactiveListCommands.LSetCommand.getValue()
list element atReactiveRedisConnection.KeyCommand.getKey()
.default reactor.core.publisher.Mono<Boolean>
lTrim
(ByteBuffer key, long start, long end) Trim list at key to elements between start and end.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveRedisConnection.RangeCommand>>
lTrim
(org.reactivestreams.Publisher<ReactiveRedisConnection.RangeCommand> commands) Trim list atReactiveRedisConnection.KeyCommand.getKey()
to elements withinReactiveRedisConnection.RangeCommand.getRange()
.reactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.PopCommand>>
pop
(org.reactivestreams.Publisher<ReactiveListCommands.PopCommand> commands) Removes and returns last element in list stored atReactiveRedisConnection.KeyCommand.getKey()
reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveListCommands.PopCommand,
reactor.core.publisher.Flux<ByteBuffer>>> popList
(org.reactivestreams.Publisher<ReactiveListCommands.PopCommand> commands) Removes and returns last element in list stored atReactiveRedisConnection.KeyCommand.getKey()
reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveListCommands.PushCommand,
Long>> push
(org.reactivestreams.Publisher<ReactiveListCommands.PushCommand> commands) default reactor.core.publisher.Mono<ByteBuffer>
rPop
(ByteBuffer key) Removes and returns last element in list stored at key.default reactor.core.publisher.Flux<ByteBuffer>
rPop
(ByteBuffer key, long count) Removes and returns lastcount
elements in list stored at key.default reactor.core.publisher.Mono<ByteBuffer>
rPopLPush
(ByteBuffer source, ByteBuffer destination) Remove the last element from list at source, append it to destination and return its value.reactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.RPopLPushCommand>>
rPopLPush
(org.reactivestreams.Publisher<ReactiveListCommands.RPopLPushCommand> commands) Remove the last element from list atReactiveRedisConnection.KeyCommand.getKey()
, append it toReactiveListCommands.RPopLPushCommand.getDestination()
and return its value.default reactor.core.publisher.Mono<Long>
rPush
(ByteBuffer key, List<ByteBuffer> values) Append values to key.default reactor.core.publisher.Mono<Long>
rPushX
(ByteBuffer key, ByteBuffer value) Append values to key only if key already exists.
-
Method Details
-
rPush
Append values to key.- Parameters:
key
- must not be null.values
- must not be null.- Returns:
- See Also:
-
rPushX
Append values to key only if key already exists.- Parameters:
key
- must not be null.value
- must not be null.- Returns:
- See Also:
-
lPush
Prepend values to key.- Parameters:
key
- must not be null.values
- must not be null.- Returns:
- See Also:
-
lPushX
Prepend value to key if key already exists.- Parameters:
key
- must not be null.value
- must not be null.- Returns:
- See Also:
-
push
reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveListCommands.PushCommand,Long>> push(org.reactivestreams.Publisher<ReactiveListCommands.PushCommand> commands) PrependReactiveListCommands.PushCommand.getValues()
toReactiveRedisConnection.KeyCommand.getKey()
.- Parameters:
commands
- must not be null.- Returns:
- See Also:
-
lLen
Get the size of list stored at key.- Parameters:
key
- must not be null.- Returns:
- See Also:
-
lLen
reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,Long>> lLen(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands) Get the size of list stored atReactiveRedisConnection.KeyCommand.getKey()
- Parameters:
commands
- must not be null.- Returns:
- See Also:
-
lRange
Get elements between start and end from list at key.- Parameters:
key
- must not be null.start
-end
-- Returns:
- See Also:
-
lRange
reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveRedisConnection.RangeCommand,reactor.core.publisher.Flux<ByteBuffer>>> lRange(org.reactivestreams.Publisher<ReactiveRedisConnection.RangeCommand> commands) Get elements inReactiveRedisConnection.RangeCommand.getRange()
from list atReactiveRedisConnection.KeyCommand.getKey()
- Parameters:
commands
- must not be null.- Returns:
- See Also:
-
lTrim
Trim list at key to elements between start and end.- Parameters:
key
- must not be null.start
-end
-- Returns:
- See Also:
-
lTrim
reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveRedisConnection.RangeCommand>> lTrim(org.reactivestreams.Publisher<ReactiveRedisConnection.RangeCommand> commands) Trim list atReactiveRedisConnection.KeyCommand.getKey()
to elements withinReactiveRedisConnection.RangeCommand.getRange()
.- Parameters:
commands
- must not be null.- Returns:
- See Also:
-
lPos
Get first index of the element from list at key.- Parameters:
key
- must not be null.element
-- Returns:
- a
Mono
emitting the elements index. - Since:
- 2.4
- See Also:
-
lPos
Get indices of the element from list atReactiveRedisConnection.KeyCommand.getKey()
.- Parameters:
command
- must not be null.- Returns:
- a
Flux
emitting the elements indices one by one. - Since:
- 2.4
- See Also:
-
lPos
reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveListCommands.LPosCommand,Long>> lPos(org.reactivestreams.Publisher<ReactiveListCommands.LPosCommand> commands) Get indices of the element from list atReactiveRedisConnection.KeyCommand.getKey()
.- Parameters:
commands
- must not be null.- Returns:
- a
Flux
emitting the elements indices one by one. - Since:
- 2.4
- See Also:
-
lIndex
Get element at index form list at key.- Parameters:
key
- must not be null.index
-- Returns:
- See Also:
-
lIndex
reactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.LIndexCommand>> lIndex(org.reactivestreams.Publisher<ReactiveListCommands.LIndexCommand> commands) Get element atReactiveListCommands.LIndexCommand.getIndex()
form list atReactiveRedisConnection.KeyCommand.getKey()
.- Parameters:
commands
- must not be null.- Returns:
- See Also:
-
lInsert
default reactor.core.publisher.Mono<Long> lInsert(ByteBuffer key, RedisListCommands.Position position, ByteBuffer pivot, ByteBuffer value) Insert valueRedisListCommands.Position.BEFORE
orRedisListCommands.Position.AFTER
existing pivot for key.- Parameters:
key
- must not be null.position
- must not be null.pivot
- must not be null.value
- must not be null.- Returns:
- See Also:
-
lInsert
reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveListCommands.LInsertCommand,Long>> lInsert(org.reactivestreams.Publisher<ReactiveListCommands.LInsertCommand> commands) InsertReactiveListCommands.LInsertCommand.getValue()
RedisListCommands.Position.BEFORE
orRedisListCommands.Position.AFTER
existingReactiveListCommands.LInsertCommand.getPivot()
forReactiveRedisConnection.KeyCommand.getKey()
- Parameters:
commands
- must not be null.- Returns:
- See Also:
-
lMove
default reactor.core.publisher.Mono<ByteBuffer> lMove(ByteBuffer sourceKey, ByteBuffer destinationKey, ReactiveListCommands.Direction from, ReactiveListCommands.Direction to) Atomically returns and removes the first/last element (head/tail depending on thefrom
argument) of the list stored atsourceKey
, and pushes the element at the first/last element (head/tail depending on theto
argument) of the list stored atdestinationKey
.- Parameters:
sourceKey
- must not be null.destinationKey
- must not be null.from
- must not be null.to
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
lMove
reactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.LMoveCommand>> lMove(org.reactivestreams.Publisher<? extends ReactiveListCommands.LMoveCommand> commands) Atomically returns and removes the first/last element (head/tail depending on thefrom
argument) of the list stored atsourceKey
, and pushes the element at the first/last element (head/tail depending on theto
argument) of the list stored atdestinationKey
.- Parameters:
commands
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
bLMove
default reactor.core.publisher.Mono<ByteBuffer> bLMove(ByteBuffer sourceKey, ByteBuffer destinationKey, ReactiveListCommands.Direction from, ReactiveListCommands.Direction to, Duration timeout) Atomically returns and removes the first/last element (head/tail depending on thefrom
argument) of the list stored atsourceKey
, and pushes the element at the first/last element (head/tail depending on theto
argument) of the list stored atdestinationKey
.- Parameters:
sourceKey
- must not be null.destinationKey
- must not be null.from
- must not be null.to
- must not be null.timeout
-- Returns:
- Since:
- 2.6
- See Also:
-
bLMove
reactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.BLMoveCommand>> bLMove(org.reactivestreams.Publisher<ReactiveListCommands.BLMoveCommand> commands) Atomically returns and removes the first/last element (head/tail depending on thefrom
argument) of the list stored atsourceKey
, and pushes the element at the first/last element (head/tail depending on theto
argument) of the list stored atdestinationKey
.Blocks connection until element available or
timeout
reached.- Parameters:
commands
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
lSet
Set the value list element at index.- Parameters:
key
- must not be null.index
-value
- must not be null.- Returns:
- See Also:
-
lSet
reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveListCommands.LSetCommand>> lSet(org.reactivestreams.Publisher<ReactiveListCommands.LSetCommand> commands) Set theReactiveListCommands.LSetCommand.getValue()
list element atReactiveRedisConnection.KeyCommand.getKey()
.- Parameters:
commands
-- Returns:
- See Also:
-
lRem
Removes all occurrences of value from the list stored at key.- Parameters:
key
- must not be null.value
- must not be null.- Returns:
- See Also:
-
lRem
Removes the first count occurrences of value from the list stored at key.- Parameters:
key
- must not be null.count
- must not be null.value
- must not be null.- Returns:
- See Also:
-
lRem
reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveListCommands.LRemCommand,Long>> lRem(org.reactivestreams.Publisher<ReactiveListCommands.LRemCommand> commands) Removes theReactiveListCommands.LRemCommand.getCount()
occurrences ofReactiveListCommands.LRemCommand.getValue()
from the list stored atReactiveRedisConnection.KeyCommand.getKey()
.- Parameters:
commands
- must not be null.- Returns:
- See Also:
-
lPop
Removes and returns first element in list stored at key.- Parameters:
key
- must not be null.- Returns:
- See Also:
-
lPop
Removes and returns firstcount
elements in list stored at key.- Parameters:
key
- must not be null.count
-- Returns:
- Since:
- 2.6
- See Also:
-
rPop
Removes and returns last element in list stored at key.- Parameters:
key
- must not be null.- Returns:
- See Also:
-
rPop
Removes and returns lastcount
elements in list stored at key.- Parameters:
key
- must not be null.count
-- Returns:
- Since:
- 2.6
- See Also:
-
pop
reactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.PopCommand>> pop(org.reactivestreams.Publisher<ReactiveListCommands.PopCommand> commands) Removes and returns last element in list stored atReactiveRedisConnection.KeyCommand.getKey()
- Parameters:
commands
- must not be null.- Returns:
- See Also:
-
popList
reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveListCommands.PopCommand,reactor.core.publisher.Flux<ByteBuffer>>> popList(org.reactivestreams.Publisher<ReactiveListCommands.PopCommand> commands) Removes and returns last element in list stored atReactiveRedisConnection.KeyCommand.getKey()
- Parameters:
commands
- must not be null.- Returns:
- See Also:
-
blPop
default reactor.core.publisher.Mono<ReactiveListCommands.PopResult> blPop(List<ByteBuffer> keys, Duration timeout) Removes and returns first element from lists stored at keys.
Blocks connection until element available or timeout reached.- Parameters:
keys
- must not be null.timeout
- must not be null.- Returns:
- See Also:
-
brPop
default reactor.core.publisher.Mono<ReactiveListCommands.PopResult> brPop(List<ByteBuffer> keys, Duration timeout) Removes and returns last element from lists stored at keys.
Blocks connection until element available or timeout reached.- Parameters:
keys
- must not be null.timeout
- must not be null.- Returns:
- See Also:
-
bPop
reactor.core.publisher.Flux<ReactiveListCommands.PopResponse> bPop(org.reactivestreams.Publisher<ReactiveListCommands.BPopCommand> commands) Removes and returns the topReactiveListCommands.BPopCommand.getDirection()
element from lists stored atReactiveListCommands.BPopCommand.getKeys()
.
Blocks connection until element available orReactiveListCommands.BPopCommand.getTimeout()
reached.- Parameters:
commands
-- Returns:
- See Also:
-
rPopLPush
default reactor.core.publisher.Mono<ByteBuffer> rPopLPush(ByteBuffer source, ByteBuffer destination) Remove the last element from list at source, append it to destination and return its value.- Parameters:
source
- must not be null.destination
- must not be null.- Returns:
- See Also:
-
rPopLPush
reactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.RPopLPushCommand>> rPopLPush(org.reactivestreams.Publisher<ReactiveListCommands.RPopLPushCommand> commands) Remove the last element from list atReactiveRedisConnection.KeyCommand.getKey()
, append it toReactiveListCommands.RPopLPushCommand.getDestination()
and return its value.- Parameters:
commands
- must not be null.- Returns:
- See Also:
-
bRPopLPush
default reactor.core.publisher.Mono<ByteBuffer> bRPopLPush(ByteBuffer source, ByteBuffer destination, Duration timeout) Remove the last element from list at source, append it to destination and return its value. Blocks connection until element available or timeout reached.- Parameters:
source
- must not be null.destination
- must not be null.- Returns:
- See Also:
-
bRPopLPush
reactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.BRPopLPushCommand>> bRPopLPush(org.reactivestreams.Publisher<ReactiveListCommands.BRPopLPushCommand> commands) Remove the last element from list atReactiveRedisConnection.KeyCommand.getKey()
, append it toReactiveListCommands.BRPopLPushCommand.getDestination()
and return its value.
Blocks connection until element available orReactiveListCommands.BRPopLPushCommand.getTimeout()
reached.- Parameters:
commands
- must not be null.- Returns:
- See Also:
-