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); }
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()][])); }