Example #1
0
 public void zinterstore(final byte[] dstkey, final byte[]... sets) {
   final byte[][] params = new byte[sets.length + 2][];
   params[0] = dstkey;
   params[1] = Protocol.toByteArray(sets.length);
   System.arraycopy(sets, 0, params, 2, sets.length);
   sendCommand(ZINTERSTORE, params);
 }
Example #2
0
 public void brpop(final int timeout, final byte[]... keys) {
   final List<byte[]> args = new ArrayList<byte[]>();
   for (final byte[] arg : keys) {
     args.add(arg);
   }
   args.add(Protocol.toByteArray(timeout));
   brpop(args.toArray(new byte[args.size()][]));
 }
Example #3
0
 public void zinterstore(final byte[] dstkey, final ZParams params, final byte[]... sets) {
   final List<byte[]> args = new ArrayList<byte[]>();
   args.add(dstkey);
   args.add(Protocol.toByteArray(sets.length));
   for (final byte[] set : sets) {
     args.add(set);
   }
   args.addAll(params.getParams());
   sendCommand(ZINTERSTORE, args.toArray(new byte[args.size()][]));
 }