List of usage examples for org.springframework.data.redis.connection RedisConnection zRevRangeByScoreWithScores
@Nullable default Set<Tuple> zRevRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count)
From source file:com.mauersu.util.redis.DefaultZSetOperations.java
public Set<TypedTuple<V>> reverseRangeByScoreWithScores(K key, final double min, final double max, final long offset, final long count) { final byte[] rawKey = rawKey(key); Set<Tuple> rawValues = execute(new RedisCallback<Set<Tuple>>() { public Set<Tuple> doInRedis(RedisConnection connection) { connection.select(dbIndex);/*ww w . j a v a 2 s . c o m*/ return connection.zRevRangeByScoreWithScores(rawKey, min, max, offset, count); } }, true); return deserializeTupleValues(rawValues); }
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Get set of {@link Tuple} in range from {@code begin} to {@code end} where score is between {@code min} and * {@code max} from sorted set ordered high -> low. * <p>//from w ww. j av a 2s .c o m * See http://redis.io/commands/zrevrangebyscore * * @param key key * @param min min * @param max max * @param offset offset * @param count count * @return Set<Tuple> */ public static Set<Tuple> zRevRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count) { return redisTemplate.execute(new RedisCallback<Set<Tuple>>() { @Override public Set<Tuple> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRevRangeByScoreWithScores(key, min, max, offset, count); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Get set of {@link Tuple} in range from {@code begin} to {@code end} where score is between {@code min} and * {@code max} from sorted set ordered high -> low. * <p>//from w w w . j a v a 2 s .c o m * See http://redis.io/commands/zrevrangebyscore * * @param key key * @param min min * @param max max * @param offset offset * @param count count * @return Set<Tuple> */ public Set<Tuple> zRevRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count) { return redisTemplate.execute(new RedisCallback<Set<Tuple>>() { @Override public Set<Tuple> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRevRangeByScoreWithScores(key, min, max, offset, count); } }); }