Pops an element from a list, pushes it to another list and returns it. Blocks until an element is available otherwise. Deletes the list if the last element was moved.
BLMOVE source
destination <LEFT |
RIGHT>
<LEFT |
RIGHT> timeout
BLMOVE is the blocking variant of LMOVE. When source
contains elements, this command behaves exactly like LMOVE.
When used inside a MULTI/EXEC block, this command behaves
exactly like LMOVE. When source is empty,
Valkey will block the connection until another client pushes to it or
until timeout (a double value specifying the maximum number
of seconds to block) is reached. A timeout of zero can be
used to block indefinitely.
This command comes in place of the now deprecated BRPOPLPUSH. Doing
BLMOVE RIGHT LEFT is equivalent.
See LMOVE for more
information.
Please see the pattern description in the LMOVE
documentation.
Please see the pattern description in the LMOVE
documentation.
One of the following:
Bulk string reply: the element being popped from the source and pushed to the destination.
Nil reply: the operation timed-out
One of the following:
Bulk string reply: the element being popped from the source and pushed to the destination.
Null reply: the operation timed-out
O(1)
@blocking @list @slow @write
BLMPOP, BLPOP, BRPOP, BRPOPLPUSH, LINDEX, LINSERT, LLEN, LMOVE, LMPOP, LPOP, LPOS, LPUSH, LPUSHX, LRANGE, LREM, LSET, LTRIM, RPOP, RPOPLPUSH, RPUSH, RPUSHX.