public void brpop(final String[] args) { final byte[][] bargs = new byte[args.length][]; for (int i = 0; i < bargs.length; i++) { bargs[i] = SafeEncoder.encode(args[i]); } brpop(bargs); }
public void brpop(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)); brpop(args.toArray(new String[size])); }
public List<String> brpop(int timeout, String... keys) { checkIsInMulti(); 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()])); client.setTimeoutInfinite(); List<String> multiBulkReply = client.getMultiBulkReply(); client.rollbackTimeout(); return multiBulkReply; }