List of usage examples for org.springframework.data.redis.connection RedisConnection zInterStore
@Nullable default Long zInterStore(byte[] destKey, Aggregate aggregate, int[] weights, byte[]... sets)
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Intersect sorted {@code sets} and store result in destination {@code key}. * <p>//from w ww .j ava 2 s.c o m * See http://redis.io/commands/zinterstore * * @param destKey destKey * @param aggregate aggregate * @param weights weights * @param sets sets * @return Long */ public static Long zInterStore(byte[] destKey, Aggregate aggregate, int[] weights, byte[]... sets) { return redisTemplate.execute(new RedisCallback<Long>() { @Override public Long doInRedis(RedisConnection redis) throws DataAccessException { return redis.zInterStore(destKey, aggregate, weights, sets); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Intersect sorted {@code sets} and store result in destination {@code key}. * <p>/*from ww w. j av a2 s . c o m*/ * See http://redis.io/commands/zinterstore * * @param destKey destKey * @param aggregate aggregate * @param weights weights * @param sets sets * @return Long */ public Long zInterStore(byte[] destKey, Aggregate aggregate, int[] weights, byte[]... sets) { return redisTemplate.execute(new RedisCallback<Long>() { @Override public Long doInRedis(RedisConnection redis) throws DataAccessException { return redis.zInterStore(destKey, aggregate, weights, sets); } }); }