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 between {@code begin} and {@code end} from sorted set. * <p>// w w w . j a v a 2s .c om * See http://redis.io/commands/zrange * * @param key key * @param begin begin * @param end end * @return Set<Tuple> */ public static Set<Tuple> zRangeWithScores(byte[] key, long begin, long end) { return redisTemplate.execute(new RedisCallback<Set<Tuple>>() { @Override public Set<Tuple> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRangeWithScores(key, begin, end); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Get set of {@link Tuple}s between {@code begin} and {@code end} from sorted set. * <p>// w w w .j a va2s. co m * See http://redis.io/commands/zrange * * @param key key * @param begin begin * @param end end * @return Set<Tuple> */ public Set<Tuple> zRangeWithScores(byte[] key, long begin, long end) { return redisTemplate.execute(new RedisCallback<Set<Tuple>>() { @Override public Set<Tuple> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRangeWithScores(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>//from w w w.ja v a 2s. c om * See http://redis.io/commands/zrangebyscore * * @param key key * @param min min * @param max max * @return Set<byte[]> */ public static Set<byte[]> zRangeByScore(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>/*from www . ja va 2s .c o m*/ * See http://redis.io/commands/zrangebyscore * * @param key key * @param min min * @param max max * @return Set<byte[]> */ public Set<byte[]> zRangeByScore(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.RedisUtils.java
/** * Get set of {@link Tuple}s where score is between {@code Range#min} and {@code Range#max} from sorted set. * // ww w .ja va 2 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 ww w .j a va2 s .c o m * @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); } }); }
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Get set of {@link Tuple}s where score is between {@code min} and {@code max} from sorted set. * <p>//w w w . j a va2s . c o m * See http://redis.io/commands/zrangebyscore * * @param key key * @param min min * @param max max * @return Set<Tuple> */ public static Set<Tuple> zRangeByScoreWithScores(byte[] key, double min, double max) { return redisTemplate.execute(new RedisCallback<Set<Tuple>>() { @Override public Set<Tuple> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRangeByScoreWithScores(key, min, max); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Get set of {@link Tuple}s where score is between {@code min} and {@code max} from sorted set. * <p>//from w ww . j a va 2s. co m * See http://redis.io/commands/zrangebyscore * * @param key key * @param min min * @param max max * @return Set<Tuple> */ public Set<Tuple> zRangeByScoreWithScores(byte[] key, double min, double max) { return redisTemplate.execute(new RedisCallback<Set<Tuple>>() { @Override public Set<Tuple> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRangeByScoreWithScores(key, min, max); } }); }
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Get elements in range from {@code begin} to {@code end} where score is between {@code min} and {@code max} from * sorted set.//www . jav a 2 s .c om * <p> * See http://redis.io/commands/zrangebyscore * * @param key key * @param min min * @param max max * @param offset offset * @param count count * @return Set<byte[]> */ public static Set<byte[]> zRangeByScore(byte[] key, double min, double max, long offset, long count) { return redisTemplate.execute(new RedisCallback<Set<byte[]>>() { @Override public Set<byte[]> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRangeByScore(key, min, max, offset, count); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Get elements in range from {@code begin} to {@code end} where score is between {@code min} and {@code max} from * sorted set./*from w ww . j a va2 s. co m*/ * <p> * See http://redis.io/commands/zrangebyscore * * @param key key * @param min min * @param max max * @param offset offset * @param count count * @return Set<byte[]> */ public Set<byte[]> zRangeByScore(byte[] key, double min, double max, long offset, long count) { return redisTemplate.execute(new RedisCallback<Set<byte[]>>() { @Override public Set<byte[]> doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRangeByScore(key, min, max, offset, count); } }); }