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