]> git.saurik.com Git - redis.git/blame - doc/BrpoplpushCommand.html
when Redis fails accepting a new connection reports the error at WARNING and not...
[redis.git] / doc / BrpoplpushCommand.html
CommitLineData
6674e3b9 1
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
3<html>
4 <head>
5 <link type="text/css" rel="stylesheet" href="style.css" />
6 </head>
7 <body>
8 <div id="page">
9
10 <div id='header'>
11 <a href="index.html">
12 <img style="border:none" alt="Redis Documentation" src="redis.png">
13 </a>
14 </div>
15
16 <div id="pagecontent">
17 <div class="index">
18<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
19<b>BrpoplpushCommand: Contents</b><br>&nbsp;&nbsp;<a href="#BRPOPLPUSH _srckey_ _dstkey_ _timeout_ (Redis &gt;">BRPOPLPUSH _srckey_ _dstkey_ _timeout_ (Redis &gt;</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a>
20 </div>
21
22 <h1 class="wikiname">BrpoplpushCommand</h1>
23
24 <div class="summary">
25
26 </div>
27
28 <div class="narrow">
29
30<h1><a name="BRPOPLPUSH _srckey_ _dstkey_ _timeout_ (Redis &gt;">BRPOPLPUSH _srckey_ _dstkey_ _timeout_ (Redis &gt;</a></h1> 2.1.8) =
31<i>Time complexity: O(1)</i><blockquote>Blocking version of the <a href="RpoplpushCommand.html">RPOPLPUSH</a> command. Atomically removes and returnsthe last element (tail) of the source list at <i>srckey</i>, and as a side effect pushes the returned element in the head of the list at <i>dstkey</i>.</blockquote>
32If the source list is empty, the client blocks until another client pushes against the source list. Of course in such a case the push operation against the destination list will be performed after the command unblocks detecting a push against the source list.<br/><br/>Note that the command returns an error if the target key already exists but is not a list. The error is delayed at the time the push operation is attempted, that is, immediately if the source list is not empty, or when the first push against the source list happens in the case the command would block.<br/><br/>The timeout value can be 0 or a positive integer value. When it is zero the command will block forever, until something is pushed against <i>srckey</i>. Otherwise the command will wait the specified number of seconds at max, returning an nil value when the timeout expires.<br/><br/>The source and destination of the list can be the same, having the effect of rotating the list. Please check <a href="RpoplpushCommand.html">RPOPLPUSH</a> for more information.<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Bulk reply</a>
33 </div>
34
35 </div>
36 </div>
37 </body>
38</html>
39