@Override public Long zInterStore(byte[] destKey, byte[]... sets) { Assert.notNull(destKey, "Destination key must not be null!"); Assert.notNull(sets, "Source sets must not be null!"); Assert.noNullElements(sets, "Source sets must not contain null elements!"); try { if (isPipelined()) { pipeline(connection.newJedisResult(connection.getRequiredPipeline().zinterstore(destKey, sets))); return null; } if (isQueueing()) { transaction(connection.newJedisResult(connection.getRequiredTransaction().zinterstore(destKey, sets))); return null; } return connection.getJedis().zinterstore(destKey, sets); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Long zInterStore(byte[] destKey, Aggregate aggregate, Weights weights, byte[]... sets) { Assert.notNull(destKey, "Destination key must not be null!"); Assert.notNull(sets, "Source sets must not be null!"); Assert.noNullElements(sets, "Source sets must not contain null elements!"); Assert.isTrue(weights.size() == sets.length, () -> String .format("The number of weights (%d) must match the number of source sets (%d)!", weights.size(), sets.length)); try { ZParams zparams = new ZParams().weights(weights.toArray()).aggregate(ZParams.Aggregate.valueOf(aggregate.name())); if (isPipelined()) { pipeline(connection.newJedisResult(connection.getRequiredPipeline().zinterstore(destKey, zparams, sets))); return null; } if (isQueueing()) { transaction(connection.newJedisResult(connection.getRequiredTransaction().zinterstore(destKey, zparams, sets))); return null; } return connection.getJedis().zinterstore(destKey, zparams, sets); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
params.weightsByDouble(1.0, 0.0); transaction.zinterstore(BUCKET + point, params, BUCKET + point, BUCKET_MONITOR + point);
private void zinterstore0(String destination, String... keys) { t.zinterstore(destination, keys); }
((Transaction) connection).zinterstore(destStore, keySets.toArray(new String[] {}));
private void zinterstoremin0(String destination, String... keys) { t.zinterstore(destination, new ZParams().aggregate(Aggregate.MIN), keys); }
private void zinterstoremax0(String destination, String... keys) { t.zinterstore(destination, new ZParams().aggregate(Aggregate.MAX), keys); }
@SuppressWarnings("deprecation") private void zinterstore_weights(String destination, Map<String, Integer> weightkeys) { Object[] objs = convert4zstore(weightkeys); String[] keys = (String[]) objs[0]; int [] weights = (int[]) objs[1]; t.zinterstore(destination, new ZParams().weights(weights), keys); }
@SuppressWarnings("deprecation") private void zinterstore_weights_min(String destination, Map<String, Integer> weightkeys) { Object[] objs = convert4zstore(weightkeys); String[] keys = (String[]) objs[0]; int [] weights = (int[]) objs[1]; t.zinterstore(destination, new ZParams().weights(weights).aggregate(Aggregate.MIN), keys); }
@SuppressWarnings("deprecation") private void zinterstore_weights_max(String destination, Map<String, Integer> weightkeys) { Object[] objs = convert4zstore(weightkeys); String[] keys = (String[]) objs[0]; int [] weights = (int[]) objs[1]; t.zinterstore(destination, new ZParams().weights(weights).aggregate(Aggregate.MAX), keys); }
@Override public Long zInterStore(byte[] destKey, byte[]... sets) { Assert.notNull(destKey, "Destination key must not be null!"); Assert.notNull(sets, "Source sets must not be null!"); Assert.noNullElements(sets, "Source sets must not contain null elements!"); try { if (isPipelined()) { pipeline(connection.newJedisResult(connection.getRequiredPipeline().zinterstore(destKey, sets))); return null; } if (isQueueing()) { transaction(connection.newJedisResult(connection.getRequiredTransaction().zinterstore(destKey, sets))); return null; } return connection.getJedis().zinterstore(destKey, sets); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Long zInterStore(byte[] destKey, byte[]... sets) { Assert.notNull(destKey, "Destination key must not be null!"); Assert.notNull(sets, "Source sets must not be null!"); Assert.noNullElements(sets, "Source sets must not contain null elements!"); try { if (isPipelined()) { pipeline(connection.newJedisResult(connection.getRequiredPipeline().zinterstore(destKey, sets))); return null; } if (isQueueing()) { transaction(connection.newJedisResult(connection.getRequiredTransaction().zinterstore(destKey, sets))); return null; } return connection.getJedis().zinterstore(destKey, sets); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Long zInterStore(byte[] destKey, Aggregate aggregate, Weights weights, byte[]... sets) { Assert.notNull(destKey, "Destination key must not be null!"); Assert.notNull(sets, "Source sets must not be null!"); Assert.noNullElements(sets, "Source sets must not contain null elements!"); Assert.isTrue(weights.size() == sets.length, () -> String .format("The number of weights (%d) must match the number of source sets (%d)!", weights.size(), sets.length)); try { ZParams zparams = new ZParams().weightsByDouble(weights.toArray()) .aggregate(ZParams.Aggregate.valueOf(aggregate.name())); if (isPipelined()) { pipeline(connection.newJedisResult(connection.getRequiredPipeline().zinterstore(destKey, zparams, sets))); return null; } if (isQueueing()) { transaction(connection.newJedisResult(connection.getRequiredTransaction().zinterstore(destKey, zparams, sets))); return null; } return connection.getJedis().zinterstore(destKey, zparams, sets); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Long zInterStore(byte[] destKey, Aggregate aggregate, Weights weights, byte[]... sets) { Assert.notNull(destKey, "Destination key must not be null!"); Assert.notNull(sets, "Source sets must not be null!"); Assert.noNullElements(sets, "Source sets must not contain null elements!"); Assert.isTrue(weights.size() == sets.length, () -> String .format("The number of weights (%d) must match the number of source sets (%d)!", weights.size(), sets.length)); try { ZParams zparams = new ZParams().weightsByDouble(weights.toArray()) .aggregate(ZParams.Aggregate.valueOf(aggregate.name())); if (isPipelined()) { pipeline(connection.newJedisResult(connection.getRequiredPipeline().zinterstore(destKey, zparams, sets))); return null; } if (isQueueing()) { transaction(connection.newJedisResult(connection.getRequiredTransaction().zinterstore(destKey, zparams, sets))); return null; } return connection.getJedis().zinterstore(destKey, zparams, sets); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
((Transaction) connection).zinterstore(destStore, keySets.toArray(new String[] {}));