add brpoplpush

This commit is contained in:
Jonathan Leibiusky
2010-12-20 11:10:02 -03:00
parent c30359581e
commit 3f79d80396
6 changed files with 90 additions and 1 deletions

View File

@@ -2581,4 +2581,18 @@ public class Jedis extends BinaryJedis implements JedisCommands {
client.linsert(key, where, pivot, value);
return client.getIntegerReply();
}
/**
* Pop a value from a list, push it to another list and return it; or block
* until one is available
*
* @param source
* @param destination
* @param timeout
* @return the element
*/
public String brpoplpush(String source, String destination, int timeout) {
client.brpoplpush(source, destination, timeout);
return client.getBulkReply();
}
}