List of usage examples for org.springframework.data.redis.core RedisCallback RedisCallback
RedisCallback
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Get set of {@link Tuple}s in range from {@code begin} to {@code end} where score is between {@code min} and * {@code max} from sorted set.// ww w. j ava 2 s . com * <p> * See http://redis.io/commands/zrangebyscore * * @param key key * @param min min * @param max max * @param offset offset * @param count count * @return Set<Tuple> */ public static Set<Tuple> zRangeByScoreWithScores(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.zRangeByScoreWithScores(key, min, max, offset, count); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Get set of {@link Tuple}s in range from {@code begin} to {@code end} where score is between {@code min} and * {@code max} from sorted set./*from w w w .j a va 2 s. com*/ * <p> * See http://redis.io/commands/zrangebyscore * * @param key key * @param min min * @param max max * @param offset offset * @param count count * @return Set<Tuple> */ public Set<Tuple> zRangeByScoreWithScores(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.zRangeByScoreWithScores(key, min, max, offset, count); } }); }
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Get set of {@link Tuple}s in range from {@code Limit#offset} to {@code Limit#offset + Limit#count} where score is * between {@code Range#min} and {@code Range#max} from sorted set. * //from w ww . j av a 2s . c om * @param key key * @param range range * @param limit limit * @return Set<Tuple> * @since 1.6 */ public static Set<Tuple> zRangeByScoreWithScores(byte[] key, Range range, Limit limit) { return redisTemplate.execute(new RedisCallback<Set<Tuple>>() { @Override public Set<Tuple> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRangeByScoreWithScores(key, range, limit); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Get set of {@link Tuple}s in range from {@code Limit#offset} to {@code Limit#offset + Limit#count} where score is * between {@code Range#min} and {@code Range#max} from sorted set. * /* ww w.j a v a2 s . c o m*/ * @param key key * @param range range * @param limit limit * @return Set<Tuple> * @since 1.6 */ public Set<Tuple> zRangeByScoreWithScores(byte[] key, Range range, Limit limit) { return redisTemplate.execute(new RedisCallback<Set<Tuple>>() { @Override public Set<Tuple> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRangeByScoreWithScores(key, range, limit); } }); }
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Get elements in range from {@code begin} to {@code end} from sorted set ordered from high to low. * <p>// w w w .jav a2 s.c o m * See http://redis.io/commands/zrevrange * * @param key key * @param begin begin * @param end end * @return Set<byte[]> */ public static Set<byte[]> zRevRange(byte[] key, long begin, long end) { return redisTemplate.execute(new RedisCallback<Set<byte[]>>() { @Override public Set<byte[]> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRevRange(key, begin, end); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Get elements in range from {@code begin} to {@code end} from sorted set ordered from high to low. * <p>//w w w . jav a 2 s .com * See http://redis.io/commands/zrevrange * * @param key key * @param begin begin * @param end end * @return Set<byte[]> */ public Set<byte[]> zRevRange(byte[] key, long begin, long end) { return redisTemplate.execute(new RedisCallback<Set<byte[]>>() { @Override public Set<byte[]> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRevRange(key, begin, end); } }); }
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>/* www .ja v a2s. c o 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 ww w . j a va 2s . co 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); } }); }
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Get elements where score is between {@code min} and {@code max} from sorted set. * <p>/* w w w . j a v a 2 s.com*/ * See http://redis.io/commands/zrangebyscore * * @param key key * @param min min * @param max max * @return Set<byte[]> */ public static Set<byte[]> zRevRangeByScore(byte[] key, double min, double max) { return redisTemplate.execute(new RedisCallback<Set<byte[]>>() { @Override public Set<byte[]> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRangeByScore(key, min, max); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Get elements where score is between {@code min} and {@code max} from sorted set. * <p>/*w w w . j a v a2s .c om*/ * See http://redis.io/commands/zrangebyscore * * @param key key * @param min min * @param max max * @return Set<byte[]> */ public Set<byte[]> zRevRangeByScore(byte[] key, double min, double max) { return redisTemplate.execute(new RedisCallback<Set<byte[]>>() { @Override public Set<byte[]> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRangeByScore(key, min, max); } }); }