Implemented BRPOP

This commit is contained in:
Jonathan Leibiusky
2010-08-03 01:23:51 -03:00
parent dea8c12d1e
commit 2131265436
4 changed files with 40 additions and 2 deletions

View File

@@ -530,4 +530,16 @@ public class Jedis {
client.sort(key, dstkey);
return client.getIntegerReply();
}
public List<String> brpop(int timeout, String... keys)
throws JedisException {
List<String> args = new ArrayList<String>();
for (String arg : keys) {
args.add(arg);
}
args.add(String.valueOf(timeout));
client.brpop(args.toArray(new String[args.size()]));
return client.getMultiBulkReply();
}
}