Class ReactiveListCommandsImpl<K,V>
java.lang.Object
io.quarkus.redis.runtime.datasource.AbstractRedisCommands
io.quarkus.redis.runtime.datasource.ReactiveSortable<K,V>
io.quarkus.redis.runtime.datasource.AbstractListCommands<K,V>
io.quarkus.redis.runtime.datasource.ReactiveListCommandsImpl<K,V>
- All Implemented Interfaces:
ReactiveListCommands<K,,V> ReactiveRedisCommands
public class ReactiveListCommandsImpl<K,V>
extends AbstractListCommands<K,V>
implements ReactiveListCommands<K,V>
-
Field Summary
Fields inherited from class io.quarkus.redis.runtime.datasource.AbstractListCommands
DEFAULT_INSTANCE, typeOfKey, typeOfValueFields inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommands
marshaller, redis -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<V>blmove(K source, K destination, Position positionInSource, Position positionInDest, Duration timeout) Execute the command BLMOVE.Execute the command BLMPOP.Execute the command BLMPOP.Execute the command BLPOP.Execute the command BRPOP.io.smallrye.mutiny.Uni<V>brpoplpush(Duration timeout, K source, K destination) Execute the command BRPOPLPUSH.io.smallrye.mutiny.Uni<V>Execute the command LINDEX.io.smallrye.mutiny.Uni<Long>linsertAfterPivot(K key, V pivot, V element) Execute the command LINSERT.io.smallrye.mutiny.Uni<Long>linsertBeforePivot(K key, V pivot, V element) Execute the command LINSERT.io.smallrye.mutiny.Uni<Long>Execute the command LLEN.io.smallrye.mutiny.Uni<V>Execute the command LMOVE.Execute the command LMPOP.Execute the command LMPOP.io.smallrye.mutiny.Uni<V>Execute the command LPOP.Execute the command LPOP.io.smallrye.mutiny.Uni<Long>Execute the command LPOS.Execute the command LPOS.Execute the command LPOS.io.smallrye.mutiny.Uni<Long>Execute the command LPOS.io.smallrye.mutiny.Uni<Long>Execute the command LPUSH.io.smallrye.mutiny.Uni<Long>Execute the command LPUSHX.Execute the command LRANGE.io.smallrye.mutiny.Uni<Long>Execute the command LREM.io.smallrye.mutiny.Uni<Void>Execute the command LSET.io.smallrye.mutiny.Uni<Void>Execute the command LTRIM.io.smallrye.mutiny.Uni<V>Execute the command RPOP.Execute the command RPOP.io.smallrye.mutiny.Uni<V>Execute the command RPOPLPUSH.io.smallrye.mutiny.Uni<Long>Execute the command RPUSH.io.smallrye.mutiny.Uni<Long>Execute the command RPUSHX.Methods inherited from class io.quarkus.redis.runtime.datasource.AbstractListCommands
_blmove, _blmpop, _blmpop, _blpop, _brpop, _brpoplpush, _lindex, _linsertAfterPivot, _linsertBeforePivot, _llen, _lmove, _lmpop, _lmpop, _lpop, _lpop, _lpos, _lpos, _lpos, _lpos, _lpush, _lpushx, _lrange, _lrem, _lset, _ltrim, _rpop, _rpop, _rpoplpush, _rpush, _rpushx, decodeKeyValue, decodeKeyValueWithList, decodeListOfKeyValue, decodeListOfLongs, decodeListV, decodeLongOrNull, decodeVMethods inherited from class io.quarkus.redis.runtime.datasource.ReactiveSortable
sort, sort, sortAndStore, sortAndStoreMethods inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommands
execute, isMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.redis.datasource.list.ReactiveListCommands
sort, sort, sortAndStore, sortAndStore
-
Constructor Details
-
ReactiveListCommandsImpl
-
-
Method Details
-
getDataSource
- Specified by:
getDataSourcein interfaceReactiveRedisCommands- Returns:
- the data source.
-
blmove
public io.smallrye.mutiny.Uni<V> blmove(K source, K destination, Position positionInSource, Position positionInDest, Duration timeout) Description copied from interface:ReactiveListCommandsExecute the command BLMOVE. Summary: Pop an element from a list, push it to another list and return it; or block until one is available Group: list Requires Redis 6.2.0- Specified by:
blmovein interfaceReactiveListCommands<K,V> - Parameters:
source- the keydestination- the keypositionInSource- the position of the element in the source,LEFTmeans the first element,RIGHTmeans the last element.positionInDest- the position of the element in the destination,LEFTmeans the first element,RIGHTmeans the last element.timeout- the operation timeout (in seconds)- Returns:
- the element being popped from source and pushed to destination. If timeout is reached, a Null reply is returned.
-
blmpop
Description copied from interface:ReactiveListCommandsExecute the command BLMPOP. Summary: Pop elements from a list, or block until one is available Group: list Requires Redis 7.0.0- Specified by:
blmpopin interfaceReactiveListCommands<K,V> - Parameters:
timeout- the operation timeout (in seconds)position- whether if the element must be popped from the beginning of the list (LEFT) or from the end (RIGHT)keys- the keys from which the element must be popped- Returns:
nullwhen no element could be popped, and timeout is reached, otherwise the key/value structure
-
blmpop
public io.smallrye.mutiny.Uni<List<KeyValue<K,V>>> blmpop(Duration timeout, Position position, int count, K... keys) Description copied from interface:ReactiveListCommandsExecute the command BLMPOP. Summary: Pop elements from a list, or block until one is available Group: list Requires Redis 7.0.0- Specified by:
blmpopin interfaceReactiveListCommands<K,V> - Parameters:
timeout- the operation timeout (in seconds)position- whether if the element must be popped from the beginning of the list (LEFT) or from the end (RIGHT)count- the number of element to popkeys- the keys from which the element must be popped- Returns:
nullwhen no element could be popped, and timeout is reached, otherwise the list of key/value structures
-
blpop
Description copied from interface:ReactiveListCommandsExecute the command BLPOP. Summary: Remove and get the first element in a list, or block until one is available Group: list Requires Redis 2.0.0- Specified by:
blpopin interfaceReactiveListCommands<K,V> - Parameters:
timeout- the operation timeout (in seconds)keys- the keys from which the element must be popped- Returns:
- A
nullmulti-bulk when no element could be popped and the timeout expired, otherwise the key/value structure.
-
brpop
Description copied from interface:ReactiveListCommandsExecute the command BRPOP. Summary: Remove and get the last element in a list, or block until one is available Group: list Requires Redis 2.0.0- Specified by:
brpopin interfaceReactiveListCommands<K,V> - Parameters:
timeout- the operation timeout (in seconds)keys- the keys from which the element must be popped- Returns:
- A
nullmulti-bulk when no element could be popped and the timeout expired, otherwise the key/value structure.
-
brpoplpush
Description copied from interface:ReactiveListCommandsExecute the command BRPOPLPUSH. Summary: Pop an element from a list, push it to another list and return it; or block until one is available Group: list Requires Redis 2.2.0- Specified by:
brpoplpushin interfaceReactiveListCommands<K,V> - Parameters:
timeout- the timeout, in secondssource- the source keydestination- the detination key- Returns:
- the element being popped from source and pushed to destination. If timeout is reached, a Null reply is returned.
-
lindex
Description copied from interface:ReactiveListCommandsExecute the command LINDEX. Summary: Get an element from a list by its index Group: list Requires Redis 1.0.0- Specified by:
lindexin interfaceReactiveListCommands<K,V> - Parameters:
key- the keyindex- the index- Returns:
- the requested element, or
nullwhen index is out of range.
-
linsertBeforePivot
Description copied from interface:ReactiveListCommandsExecute the command LINSERT. Summary: Insert an element before another element in a list Group: list Requires Redis 2.2.0- Specified by:
linsertBeforePivotin interfaceReactiveListCommands<K,V> - Parameters:
key- the keypivot- the pivot, i.e. the position referenceelement- the element to insert- Returns:
- the length of the list after the insert operation, or -1 when the value
pivotwas not found.
-
linsertAfterPivot
Description copied from interface:ReactiveListCommandsExecute the command LINSERT. Summary: Insert an element after another element in a list Group: list Requires Redis 2.2.0- Specified by:
linsertAfterPivotin interfaceReactiveListCommands<K,V> - Parameters:
key- the keypivot- the pivot, i.e. the position referenceelement- the element to insert- Returns:
- the length of the list after the insert operation, or -1 when the value
pivotwas not found.
-
llen
Description copied from interface:ReactiveListCommandsExecute the command LLEN. Summary: Get the length of a list Group: list Requires Redis 1.0.0- Specified by:
llenin interfaceReactiveListCommands<K,V> - Parameters:
key- the key- Returns:
- the length of the list at key, if the list is empty, 0 is returned.
-
lmove
public io.smallrye.mutiny.Uni<V> lmove(K source, K destination, Position positionInSource, Position positionInDest) Description copied from interface:ReactiveListCommandsExecute the command LMOVE. Summary: Pop an element from a list, push it to another list and return it Group: list Requires Redis 6.2.0- Specified by:
lmovein interfaceReactiveListCommands<K,V> - Parameters:
source- the keydestination- the keypositionInSource- the position of the element to pop in the source (LEFT: first element, RIGHT: last element)positionInDest- the position of the element to insert in the destination (LEFT: first element, RIGHT: last element)- Returns:
- the element being popped and pushed.
-
lmpop
Description copied from interface:ReactiveListCommandsExecute the command LMPOP. Summary: Pop one element from the first non-empty list Group: list Requires Redis 7.0.0- Specified by:
lmpopin interfaceReactiveListCommands<K,V> - Parameters:
position- the position of the item to pop (LEFT: beginning ot the list, RIGHT: end of the list)keys- the keys from which the item will be popped, must not be empty- Returns:
- A
nullwhen no element could be popped. AKeyValuewith the key and popped value.
-
lmpop
Description copied from interface:ReactiveListCommandsExecute the command LMPOP. Summary: Popcountelements from the first non-empty list Group: list Requires Redis 7.0.0- Specified by:
lmpopin interfaceReactiveListCommands<K,V> - Parameters:
position- the position of the item to pop (LEFT: beginning ot the list, RIGHT: end of the list)count- the number of items to popkeys- the keys from which the item will be popped, must not be empty- Returns:
- A
emptywhen no element could be popped. A list ofKeyValuewith at most count items.
-
lpop
Description copied from interface:ReactiveListCommandsExecute the command LPOP. Summary: Remove and get the first elements in a list Group: list Requires Redis 1.0.0- Specified by:
lpopin interfaceReactiveListCommands<K,V> - Parameters:
key- the key- Returns:
- the value of the first element, or
nullwhen key does not exist.
-
lpop
Description copied from interface:ReactiveListCommandsExecute the command LPOP. Summary: Remove and get the first elements in a list Group: list Requires Redis 1.0.0- Specified by:
lpopin interfaceReactiveListCommands<K,V> - Parameters:
key- the keycount- the number of element to pop- Returns:
- the popped elements (at most
count), oremptywhen key does not exist.
-
lpos
Description copied from interface:ReactiveListCommandsExecute the command LPOS. Summary: Return the index of matching elements on a list Group: list Requires Redis 6.0.6- Specified by:
lposin interfaceReactiveListCommands<K,V> - Parameters:
key- the keyelement- the element to find- Returns:
- The command returns the integer representing the matching element, or
nullif there is no match.
-
lpos
Description copied from interface:ReactiveListCommandsExecute the command LPOS. Summary: Return the index of matching elements on a list Group: list Requires Redis 6.0.6- Specified by:
lposin interfaceReactiveListCommands<K,V> - Parameters:
key- the keyelement- the element to findargs- the extra command parameter- Returns:
- The command returns the integer representing the matching element, or
nullif there is no match.
-
lpos
Description copied from interface:ReactiveListCommandsExecute the command LPOS. Summary: Return the index of matching elements on a list Group: list Requires Redis 6.0.6- Specified by:
lposin interfaceReactiveListCommands<K,V> - Parameters:
key- the keyelement- the element to findcount- the number of occurrence to find- Returns:
- the list of positions (empty if there are no matches).
-
lpos
Description copied from interface:ReactiveListCommandsExecute the command LPOS. Summary: Return the index of matching elements on a list Group: list Requires Redis 6.0.6- Specified by:
lposin interfaceReactiveListCommands<K,V> - Parameters:
key- the keyelement- the element to findcount- the number of occurrence to find- Returns:
- the list of positions (empty if there are no matches).
-
lpush
Description copied from interface:ReactiveListCommandsExecute the command LPUSH. Summary: Prepend one or multiple elements to a list Group: list Requires Redis 1.0.0- Specified by:
lpushin interfaceReactiveListCommands<K,V> - Parameters:
key- the keyelements- the elements to add- Returns:
- the length of the list after the push operations.
-
lpushx
Description copied from interface:ReactiveListCommandsExecute the command LPUSHX. Summary: Prepend an element to a list, only if the list exists Group: list Requires Redis 2.2.0- Specified by:
lpushxin interfaceReactiveListCommands<K,V> - Parameters:
key- the keyelements- the elements to add- Returns:
- the length of the list after the push operation.
-
lrange
Description copied from interface:ReactiveListCommandsExecute the command LRANGE. Summary: Get a range of elements from a list Group: list Requires Redis 1.0.0- Specified by:
lrangein interfaceReactiveListCommands<K,V> - Parameters:
key- the keystart- the starting positionstop- the last position- Returns:
- list of elements in the specified range.
-
lrem
Description copied from interface:ReactiveListCommandsExecute the command LREM. Summary: Remove elements from a list Group: list Requires Redis 1.0.0- Specified by:
lremin interfaceReactiveListCommands<K,V> - Parameters:
key- the keycount- the number of occurence to remove, following the given rules: if count > 0: Remove elements equal to element moving from head to tail. if count < 0: Remove elements equal to element moving from tail to head. if count = 0: Remove all elements equal to element.element- the element to remove- Returns:
- the number of removed elements.
-
lset
Description copied from interface:ReactiveListCommandsExecute the command LSET. Summary: Set the value of an element in a list by its index Group: list Requires Redis 1.0.0- Specified by:
lsetin interfaceReactiveListCommands<K,V> - Parameters:
key- the keyindex- the indexelement- the element to insert- Returns:
- a Uni producing
nullon success, a failure otherwise
-
ltrim
Description copied from interface:ReactiveListCommandsExecute the command LTRIM. Summary: Trim a list to the specified range Group: list Requires Redis 1.0.0- Specified by:
ltrimin interfaceReactiveListCommands<K,V> - Parameters:
key- the keystart- the starting indexstop- the last index- Returns:
- a Uni producing
nullon success, a failure otherwise
-
rpop
Description copied from interface:ReactiveListCommandsExecute the command RPOP. Summary: Remove and get the last elements in a list Group: list Requires Redis 1.0.0- Specified by:
rpopin interfaceReactiveListCommands<K,V> - Parameters:
key- the key- Returns:
- the value of the last element, or
nullwhen key does not exist.
-
rpop
Description copied from interface:ReactiveListCommandsExecute the command RPOP. Summary: Remove and get the last elements in a list Group: list Requires Redis 1.0.0- Specified by:
rpopin interfaceReactiveListCommands<K,V> - Parameters:
key- the keycount- the number of element to pop- Returns:
- the list of popped elements, or
nullwhen key does not exist.
-
rpoplpush
Description copied from interface:ReactiveListCommandsExecute the command RPOPLPUSH. Summary: Remove the last element in a list, prepend it to another list and return it Group: list Requires Redis 1.2.0- Specified by:
rpoplpushin interfaceReactiveListCommands<K,V> - Parameters:
source- the keydestination- the key- Returns:
- the element being popped and pushed, or
nullif the source does not exist
-
rpush
Description copied from interface:ReactiveListCommandsExecute the command RPUSH. Summary: Append one or multiple elements to a list Group: list Requires Redis 1.0.0- Specified by:
rpushin interfaceReactiveListCommands<K,V> - Parameters:
key- the keyvalues- the values to add to the list- Returns:
- the length of the list after the push operation.
-
rpushx
Description copied from interface:ReactiveListCommandsExecute the command RPUSHX. Summary: Append an element to a list, only if the list exists Group: list Requires Redis 2.2.0- Specified by:
rpushxin interfaceReactiveListCommands<K,V> - Parameters:
key- the keyvalues- the values to add to the list- Returns:
- the length of the list after the push operation.
-