List of usage examples for org.springframework.data.redis.connection RedisConnection zRevRangeWithScores
@Nullable Set<Tuple> zRevRangeWithScores(byte[] key, long start, long end);
From source file:com.mauersu.util.redis.DefaultZSetOperations.java
public Set<TypedTuple<V>> reverseRangeWithScores(K key, final long start, final long end) { final byte[] rawKey = rawKey(key); Set<Tuple> rawValues = execute(new RedisCallback<Set<Tuple>>() { public Set<Tuple> doInRedis(RedisConnection connection) { connection.select(dbIndex);/*from www . j a v a 2 s .c om*/ return connection.zRevRangeWithScores(rawKey, start, end); } }, true); return deserializeTupleValues(rawValues); }
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Get set of {@link Tuple}s in range from {@code begin} to {@code end} from sorted set ordered from high to low. * <p>/*from w w w . jav a 2s . co m*/ * See http://redis.io/commands/zrevrange * * @param key key * @param begin begin * @param end end * @return Set<Tuple> */ public static Set<Tuple> zRevRangeWithScores(byte[] key, long begin, long end) { return redisTemplate.execute(new RedisCallback<Set<Tuple>>() { @Override public Set<Tuple> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRevRangeWithScores(key, begin, end); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Get set of {@link Tuple}s in range from {@code begin} to {@code end} from sorted set ordered from high to low. * <p>//from www .java 2 s. c o m * See http://redis.io/commands/zrevrange * * @param key key * @param begin begin * @param end end * @return Set<Tuple> */ public Set<Tuple> zRevRangeWithScores(byte[] key, long begin, long end) { return redisTemplate.execute(new RedisCallback<Set<Tuple>>() { @Override public Set<Tuple> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRevRangeWithScores(key, begin, end); } }); }