List of usage examples for org.springframework.data.redis.connection RedisConnection zRangeByScoreWithScores
@Nullable default Set<Tuple> zRangeByScoreWithScores(byte[] key, Range range)
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Get set of {@link Tuple}s where score is between {@code Range#min} and {@code Range#max} from sorted set. * //from w w w . java2 s . c o m * @param key key * @param range range * @return Set<Tuple> * @since 1.6 */ public static Set<Tuple> zRangeByScoreWithScores(byte[] key, Range range) { return redisTemplate.execute(new RedisCallback<Set<Tuple>>() { @Override public Set<Tuple> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRangeByScoreWithScores(key, range); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Get set of {@link Tuple}s where score is between {@code Range#min} and {@code Range#max} from sorted set. * /*from w ww . j av a 2s. com*/ * @param key key * @param range range * @return Set<Tuple> * @since 1.6 */ public Set<Tuple> zRangeByScoreWithScores(byte[] key, Range range) { return redisTemplate.execute(new RedisCallback<Set<Tuple>>() { @Override public Set<Tuple> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRangeByScoreWithScores(key, range); } }); }