List of usage examples for org.springframework.data.redis.connection RedisConnection zRemRangeByScore
@Nullable default Long zRemRangeByScore(byte[] key, double min, double max)
From source file:com.mauersu.util.redis.DefaultZSetOperations.java
public Long removeRangeByScore(K key, final double min, final double max) { final byte[] rawKey = rawKey(key); return execute(new RedisCallback<Long>() { public Long doInRedis(RedisConnection connection) { connection.select(dbIndex);//from w ww .j a va 2s . c om return connection.zRemRangeByScore(rawKey, min, max); } }, true); }
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Remove elements with scores between {@code min} and {@code max} from sorted set with {@code key}. * <p>/*from w w w . j a va 2 s. co m*/ * See http://redis.io/commands/zremrangebyscore * * @param key key * @param min min * @param max max * @return Long */ public static Long zRemRangeByScore(byte[] key, double min, double max) { return redisTemplate.execute(new RedisCallback<Long>() { @Override public Long doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRemRangeByScore(key, min, max); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Remove elements with scores between {@code min} and {@code max} from sorted set with {@code key}. * <p>/*from ww w .j av a2s .c o m*/ * See http://redis.io/commands/zremrangebyscore * * @param key key * @param min min * @param max max * @return Long */ public Long zRemRangeByScore(byte[] key, double min, double max) { return redisTemplate.execute(new RedisCallback<Long>() { @Override public Long doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRemRangeByScore(key, min, max); } }); }