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
Nested ClassesModifier and TypeInterfaceDescriptionstatic classBLMOVEcommand parameters.static classstatic classBRPOPLPUSHcommand parameters.static enumstatic classLINDEXcommand parameters.static classLINSERTcommand parameters.static classLMOVEcommand parameters.static classLPOScommand parameters.static classLREMcommand parameters.static classLSETcommand parameters.static classLPOP/RPOP command parameters.static classstatic classstatic classLPUSH/RPUSH command parameters.static classRPOPLPUSHcommand parameters. -
Method Summary
Modifier and TypeMethodDescriptiondefault 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 thefromargument) of the list stored atsourceKey, and pushes the element at the first/last element (head/tail depending on thetoargument) of the list stored atdestinationKey.bLMove(Publisher<ReactiveListCommands.BLMoveCommand> commands) Atomically returns and removes the first/last element (head/tail depending on thefromargument) of the list stored atsourceKey, and pushes the element at the first/last element (head/tail depending on thetoargument) of the list stored atdestinationKey.default Mono<ReactiveListCommands.PopResult>blPop(List<ByteBuffer> keys, Duration timeout) Removes and returns first element from lists stored at keys.bPop(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 Mono<ReactiveListCommands.PopResult>brPop(List<ByteBuffer> keys, Duration timeout) Removes and returns last element from lists stored at keys.default 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.Remove the last element from list atReactiveRedisConnection.KeyCommand.getKey(), append it toReactiveListCommands.BRPopLPushCommand.getDestination()and return its value.default Mono<ByteBuffer>lIndex(ByteBuffer key, long index) Get element at index form list at key.lIndex(Publisher<ReactiveListCommands.LIndexCommand> commands) Get element atReactiveListCommands.LIndexCommand.getIndex()form list atReactiveRedisConnection.KeyCommand.getKey().lInsert(ByteBuffer key, RedisListCommands.Position position, ByteBuffer pivot, ByteBuffer value) Insert valueRedisListCommands.Position.BEFOREorRedisListCommands.Position.AFTERexisting pivot for key.lInsert(Publisher<ReactiveListCommands.LInsertCommand> commands) lLen(ByteBuffer key) Get the size of list stored at key.lLen(Publisher<ReactiveRedisConnection.KeyCommand> commands) Get the size of list stored atReactiveRedisConnection.KeyCommand.getKey()default 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 thefromargument) of the list stored atsourceKey, and pushes the element at the first/last element (head/tail depending on thetoargument) of the list stored atdestinationKey.lMove(Publisher<? extends ReactiveListCommands.LMoveCommand> commands) Atomically returns and removes the first/last element (head/tail depending on thefromargument) of the list stored atsourceKey, and pushes the element at the first/last element (head/tail depending on thetoargument) of the list stored atdestinationKey.default Mono<ByteBuffer>lPop(ByteBuffer key) Removes and returns first element in list stored at key.default Flux<ByteBuffer>lPop(ByteBuffer key, long count) Removes and returns firstcountelements in list stored at key.lPos(ByteBuffer key, ByteBuffer element) Get first index of the element from list at key.lPos(Publisher<ReactiveListCommands.LPosCommand> commands) Get indices of the element from list atReactiveRedisConnection.KeyCommand.getKey().lPos(ReactiveListCommands.LPosCommand command) Get indices of the element from list atReactiveRedisConnection.KeyCommand.getKey().lPush(ByteBuffer key, List<ByteBuffer> values) Prepend values to key.lPushX(ByteBuffer key, ByteBuffer value) Prepend value to key if key already exists.default Flux<ByteBuffer>lRange(ByteBuffer key, long start, long end) Get elements between start and end from list at key.Flux<ReactiveRedisConnection.CommandResponse<ReactiveRedisConnection.RangeCommand,Flux<ByteBuffer>>> lRange(Publisher<ReactiveRedisConnection.RangeCommand> commands) Get elements inReactiveRedisConnection.RangeCommand.getRange()from list atReactiveRedisConnection.KeyCommand.getKey()lRem(ByteBuffer key, Long count, ByteBuffer value) Removes the first count occurrences of value from the list stored at key.lRem(ByteBuffer key, ByteBuffer value) Removes all occurrences of value from the list stored at key.lRem(Publisher<ReactiveListCommands.LRemCommand> commands) Removes theReactiveListCommands.LRemCommand.getCount()occurrences ofReactiveListCommands.LRemCommand.getValue()from the list stored atReactiveRedisConnection.KeyCommand.getKey().lSet(ByteBuffer key, long index, ByteBuffer value) Set the value list element at index.lSet(Publisher<ReactiveListCommands.LSetCommand> commands) Set theReactiveListCommands.LSetCommand.getValue()list element atReactiveRedisConnection.KeyCommand.getKey().lTrim(ByteBuffer key, long start, long end) Trim list at key to elements between start and end.lTrim(Publisher<ReactiveRedisConnection.RangeCommand> commands) Trim list atReactiveRedisConnection.KeyCommand.getKey()to elements withinReactiveRedisConnection.RangeCommand.getRange().pop(Publisher<ReactiveListCommands.PopCommand> commands) Removes and returns last element in list stored atReactiveRedisConnection.KeyCommand.getKey()popList(Publisher<ReactiveListCommands.PopCommand> commands) Removes and returns last element in list stored atReactiveRedisConnection.KeyCommand.getKey()push(Publisher<ReactiveListCommands.PushCommand> commands) default Mono<ByteBuffer>rPop(ByteBuffer key) Removes and returns last element in list stored at key.default Flux<ByteBuffer>rPop(ByteBuffer key, long count) Removes and returns lastcountelements in list stored at key.default Mono<ByteBuffer>rPopLPush(ByteBuffer source, ByteBuffer destination) Remove the last element from list at source, append it to destination and return its value.Remove the last element from list atReactiveRedisConnection.KeyCommand.getKey(), append it toReactiveListCommands.RPopLPushCommand.getDestination()and return its value.rPush(ByteBuffer key, List<ByteBuffer> values) Append values to key.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
Flux<ReactiveRedisConnection.NumericResponse<ReactiveListCommands.PushCommand,Long>> push(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
Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,Long>> lLen(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
Flux<ReactiveRedisConnection.CommandResponse<ReactiveRedisConnection.RangeCommand,Flux<ByteBuffer>>> lRange(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
Flux<ReactiveRedisConnection.BooleanResponse<ReactiveRedisConnection.RangeCommand>> lTrim(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
Monoemitting 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
Fluxemitting the elements indices one by one. - Since:
- 2.4
- See Also:
-
lPos
Flux<ReactiveRedisConnection.NumericResponse<ReactiveListCommands.LPosCommand,Long>> lPos(Publisher<ReactiveListCommands.LPosCommand> commands) Get indices of the element from list atReactiveRedisConnection.KeyCommand.getKey().- Parameters:
commands- must not be null.- Returns:
- a
Fluxemitting 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
Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.LIndexCommand>> lIndex(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 Mono<Long> lInsert(ByteBuffer key, RedisListCommands.Position position, ByteBuffer pivot, ByteBuffer value) Insert valueRedisListCommands.Position.BEFOREorRedisListCommands.Position.AFTERexisting 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
Flux<ReactiveRedisConnection.NumericResponse<ReactiveListCommands.LInsertCommand,Long>> lInsert(Publisher<ReactiveListCommands.LInsertCommand> commands) InsertReactiveListCommands.LInsertCommand.getValue()RedisListCommands.Position.BEFOREorRedisListCommands.Position.AFTERexistingReactiveListCommands.LInsertCommand.getPivot()forReactiveRedisConnection.KeyCommand.getKey()- Parameters:
commands- must not be null.- Returns:
- See Also:
-
lMove
default 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 thefromargument) of the list stored atsourceKey, and pushes the element at the first/last element (head/tail depending on thetoargument) 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
Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.LMoveCommand>> lMove(Publisher<? extends ReactiveListCommands.LMoveCommand> commands) Atomically returns and removes the first/last element (head/tail depending on thefromargument) of the list stored atsourceKey, and pushes the element at the first/last element (head/tail depending on thetoargument) of the list stored atdestinationKey.- Parameters:
commands- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
bLMove
default 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 thefromargument) of the list stored atsourceKey, and pushes the element at the first/last element (head/tail depending on thetoargument) 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
Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.BLMoveCommand>> bLMove(Publisher<ReactiveListCommands.BLMoveCommand> commands) Atomically returns and removes the first/last element (head/tail depending on thefromargument) of the list stored atsourceKey, and pushes the element at the first/last element (head/tail depending on thetoargument) of the list stored atdestinationKey.Blocks connection until element available or
timeoutreached.- 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
Flux<ReactiveRedisConnection.BooleanResponse<ReactiveListCommands.LSetCommand>> lSet(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
Flux<ReactiveRedisConnection.NumericResponse<ReactiveListCommands.LRemCommand,Long>> lRem(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 firstcountelements 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 lastcountelements in list stored at key.- Parameters:
key- must not be null.count-- Returns:
- Since:
- 2.6
- See Also:
-
pop
Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.PopCommand>> pop(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
Flux<ReactiveRedisConnection.CommandResponse<ReactiveListCommands.PopCommand,Flux<ByteBuffer>>> popList(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
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
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
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
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
Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.RPopLPushCommand>> rPopLPush(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
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
Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveListCommands.BRPopLPushCommand>> bRPopLPush(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:
-