示例#1
0
文件: Client.java 项目: mantree/jedis
 public void blpop(final String[] args) {
   final byte[][] bargs = new byte[args.length][];
   for (int i = 0; i < bargs.length; i++) {
     bargs[i] = SafeEncoder.encode(args[i]);
   }
   blpop(bargs);
 }
示例#2
0
 public void blpop(final int timeout, final String... keys) {
   final int size = keys.length + 1;
   List<String> args = new ArrayList<String>(size);
   for (String arg : keys) {
     args.add(arg);
   }
   args.add(String.valueOf(timeout));
   blpop(args.toArray(new String[size]));
 }
示例#3
0
文件: Jedis.java 项目: jsncpr/jedis
  public List<String> blpop(int timeout, String... keys) {
    checkIsInMulti();
    List<String> args = new ArrayList<String>();
    for (String arg : keys) {
      args.add(arg);
    }
    args.add(String.valueOf(timeout));

    client.blpop(args.toArray(new String[args.size()]));
    client.setTimeoutInfinite();
    List<String> multiBulkReply = client.getMultiBulkReply();
    client.rollbackTimeout();
    return multiBulkReply;
  }