Package io.quarkus.redis.datasource.list
Interface TransactionalListCommands<K,V>
-
- All Known Implementing Classes:
BlockingTransactionalListCommandsImpl
public interface TransactionalListCommands<K,V>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
blmove(K source, K destination, Position positionInSource, Position positionInDest, Duration timeout)
Execute the command BLMOVE.void
blmpop(Duration timeout, Position position, int count, K... keys)
Execute the command BLMPOP.void
blmpop(Duration timeout, Position position, K... keys)
Execute the command BLMPOP.void
blpop(Duration timeout, K... keys)
Execute the command BLPOP.void
brpop(Duration timeout, K... keys)
Execute the command BRPOP.void
brpoplpush(Duration timeout, K source, K destination)
Deprecated.See https://redis.io/commands/brpoplpushvoid
lindex(K key, long index)
Execute the command LINDEX.void
linsertAfterPivot(K key, V pivot, V element)
Execute the command LINSERT.void
linsertBeforePivot(K key, V pivot, V element)
Execute the command LINSERT.void
llen(K key)
Execute the command LLEN.void
lmove(K source, K destination, Position positionInSource, Position positionInDestination)
Execute the command LMOVE.void
lmpop(Position position, int count, K... keys)
Execute the command LMPOP.void
lmpop(Position position, K... keys)
Execute the command LMPOP.void
lpop(K key)
Execute the command LPOP.void
lpop(K key, int count)
Execute the command LPOP.void
lpos(K key, V element)
Execute the command LPOS.void
lpos(K key, V element, int count)
Execute the command LPOS.void
lpos(K key, V element, int count, LPosArgs args)
Execute the command LPOS.void
lpos(K key, V element, LPosArgs args)
Execute the command LPOS.void
lpush(K key, V... elements)
Execute the command LPUSH.void
lpushx(K key, V... elements)
Execute the command LPUSHX.void
lrange(K key, long start, long stop)
Execute the command LRANGE.void
lrem(K key, long count, V element)
Execute the command LREM.void
lset(K key, long index, V element)
Execute the command LSET.void
ltrim(K key, long start, long stop)
Execute the command LTRIM.void
rpop(K key)
Execute the command RPOP.void
rpop(K key, int count)
Execute the command RPOP.void
rpoplpush(K source, K destination)
Deprecated.See https://redis.io/commands/rpoplpushvoid
rpush(K key, V... values)
Execute the command RPUSH.void
rpushx(K key, V... values)
Execute the command RPUSHX.
-
-
-
Method Detail
-
blmove
void blmove(K source, K destination, Position positionInSource, Position positionInDest, Duration timeout)
Execute 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- Parameters:
source
- the keydestination
- the keypositionInSource
- the position of the element in the source,LEFT
means the first element,RIGHT
means the last element.positionInDest
- the position of the element in the destination,LEFT
means the first element,RIGHT
means the last element.timeout
- the operation timeout (in seconds)
-
blmpop
void blmpop(Duration timeout, Position position, K... keys)
Execute the command BLMPOP. Summary: Pop elements from a list, or block until one is available Group: list Requires Redis 7.0.0- 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
-
blmpop
void blmpop(Duration timeout, Position position, int count, K... keys)
Execute the command BLMPOP. Summary: Pop elements from a list, or block until one is available Group: list Requires Redis 7.0.0- 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
-
blpop
void blpop(Duration timeout, K... keys)
Execute 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- Parameters:
timeout
- the operation timeout (in seconds)keys
- the keys from which the element must be popped
-
brpop
void brpop(Duration timeout, K... keys)
Execute 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- Parameters:
timeout
- the operation timeout (in seconds)keys
- the keys from which the element must be popped
-
brpoplpush
@Deprecated void brpoplpush(Duration timeout, K source, K destination)
Deprecated.See https://redis.io/commands/brpoplpushExecute 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- Parameters:
timeout
- the timeout, in secondssource
- the source keydestination
- the detination key
-
lindex
void lindex(K key, long index)
Execute the command LINDEX. Summary: Get an element from a list by its index Group: list Requires Redis 1.0.0- Parameters:
key
- the keyindex
- the index
-
linsertBeforePivot
void linsertBeforePivot(K key, V pivot, V element)
Execute the command LINSERT. Summary: Insert an element before another element in a list Group: list Requires Redis 2.2.0- Parameters:
key
- the keypivot
- the pivot, i.e. the position referenceelement
- the element to insert
-
linsertAfterPivot
void linsertAfterPivot(K key, V pivot, V element)
Execute the command LINSERT. Summary: Insert an element after another element in a list Group: list Requires Redis 2.2.0- Parameters:
key
- the keypivot
- the pivot, i.e. the position referenceelement
- the element to insert
-
llen
void llen(K key)
Execute the command LLEN. Summary: Get the length of a list Group: list Requires Redis 1.0.0- Parameters:
key
- the key
-
lmove
void lmove(K source, K destination, Position positionInSource, Position positionInDestination)
Execute 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- Parameters:
source
- the keydestination
- the keypositionInSource
- the position of the element to pop in the source (LEFT: first element, RIGHT: last element)positionInDestination
- the position of the element to insert in the destination (LEFT: first element, RIGHT: last element)
-
lmpop
void lmpop(Position position, K... keys)
Execute the command LMPOP. Summary: Pop one element from the first non-empty list Group: list Requires Redis 7.0.0- 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
-
lmpop
void lmpop(Position position, int count, K... keys)
Execute the command LMPOP. Summary: Popcount
elements from the first non-empty list Group: list Requires Redis 7.0.0- 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
-
lpop
void lpop(K key)
Execute the command LPOP. Summary: Remove and get the first elements in a list Group: list Requires Redis 1.0.0- Parameters:
key
- the key
-
lpop
void lpop(K key, int count)
Execute the command LPOP. Summary: Remove and get the first elements in a list Group: list Requires Redis 1.0.0- Parameters:
key
- the keycount
- the number of element to pop
-
lpos
void lpos(K key, V element)
Execute the command LPOS. Summary: Return the index of matching elements on a list Group: list Requires Redis 6.0.6- Parameters:
key
- the keyelement
- the element to find
-
lpos
void lpos(K key, V element, LPosArgs args)
Execute the command LPOS. Summary: Return the index of matching elements on a list Group: list Requires Redis 6.0.6- Parameters:
key
- the keyelement
- the element to findargs
- the extra command parameter
-
lpos
void lpos(K key, V element, int count)
Execute the command LPOS. Summary: Return the index of matching elements on a list Group: list Requires Redis 6.0.6- Parameters:
key
- the keyelement
- the element to findcount
- the number of occurrence to find
-
lpos
void lpos(K key, V element, int count, LPosArgs args)
Execute the command LPOS. Summary: Return the index of matching elements on a list Group: list Requires Redis 6.0.6- Parameters:
key
- the keyelement
- the element to findcount
- the number of occurrence to find
-
lpush
void lpush(K key, V... elements)
Execute the command LPUSH. Summary: Prepend one or multiple elements to a list Group: list Requires Redis 1.0.0- Parameters:
key
- the keyelements
- the elements to add
-
lpushx
void lpushx(K key, V... elements)
Execute the command LPUSHX. Summary: Prepend an element to a list, only if the list exists Group: list Requires Redis 2.2.0- Parameters:
key
- the keyelements
- the elements to add
-
lrange
void lrange(K key, long start, long stop)
Execute the command LRANGE. Summary: Get a range of elements from a list Group: list Requires Redis 1.0.0- Parameters:
key
- the keystart
- the starting positionstop
- the last position
-
lrem
void lrem(K key, long count, V element)
Execute the command LREM. Summary: Remove elements from a list Group: list Requires Redis 1.0.0- 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
-
lset
void lset(K key, long index, V element)
Execute the command LSET. Summary: Set the value of an element in a list by its index Group: list Requires Redis 1.0.0- Parameters:
key
- the keyindex
- the indexelement
- the element to insert
-
ltrim
void ltrim(K key, long start, long stop)
Execute the command LTRIM. Summary: Trim a list to the specified range Group: list Requires Redis 1.0.0- Parameters:
key
- the keystart
- the starting indexstop
- the last index
-
rpop
void rpop(K key)
Execute the command RPOP. Summary: Remove and get the last elements in a list Group: list Requires Redis 1.0.0- Parameters:
key
- the key
-
rpop
void rpop(K key, int count)
Execute the command RPOP. Summary: Remove and get the last elements in a list Group: list Requires Redis 1.0.0- Parameters:
key
- the keycount
- the number of element to pop
-
rpoplpush
@Deprecated void rpoplpush(K source, K destination)
Deprecated.See https://redis.io/commands/rpoplpushExecute 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- Parameters:
source
- the keydestination
- the key
-
rpush
void rpush(K key, V... values)
Execute the command RPUSH. Summary: Append one or multiple elements to a list Group: list Requires Redis 1.0.0- Parameters:
key
- the keyvalues
- the values to add to the list
-
-