List of usage examples for org.springframework.data.redis.connection RedisConnection zRemRange
@Nullable Long zRemRange(byte[] key, long start, long end);
From source file:com.mauersu.util.redis.DefaultZSetOperations.java
public Long removeRange(K key, final long start, final long end) { final byte[] rawKey = rawKey(key); return execute(new RedisCallback<Long>() { public Long doInRedis(RedisConnection connection) { connection.select(dbIndex);/* ww w . java 2 s . c om*/ return connection.zRemRange(rawKey, start, end); } }, true); }
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Remove elements in range between {@code begin} and {@code end} from sorted set with {@code key}. * <p>/*from w ww .j a v a2 s . com*/ * See http://redis.io/commands/zremrange * * @param key key * @param begin begin * @param end end * @return Long */ public static Long zRemRange(byte[] key, long begin, long end) { return redisTemplate.execute(new RedisCallback<Long>() { @Override public Long doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRemRange(key, begin, end); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Remove elements in range between {@code begin} and {@code end} from sorted set with {@code key}. * <p>/*from w w w. jav a2s. c o m*/ * See http://redis.io/commands/zremrange * * @param key key * @param begin begin * @param end end * @return Long */ public Long zRemRange(byte[] key, long begin, long end) { return redisTemplate.execute(new RedisCallback<Long>() { @Override public Long doInRedis(RedisConnection redis) throws DataAccessException { return redis.zRemRange(key, begin, end); } }); }