List of usage examples for org.springframework.data.redis.connection RedisConnection zCount
@Nullable
Long zCount(byte[] key, Range range);
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Count number of elements within sorted set with scores between {@code Range#min} and {@code Range#max}. * /*from w w w . j av a2 s. com*/ * @param key key * @param range range * @return Long * @since 1.6 */ public static Long zCount(byte[] key, Range range) { return redisTemplate.execute(new RedisCallback<Long>() { @Override public Long doInRedis(RedisConnection redis) throws DataAccessException { return redis.zCount(key, range); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Count number of elements within sorted set with scores between {@code Range#min} and {@code Range#max}. * /*w w w. j a v a 2 s.com*/ * @param key key * @param range range * @return Long * @since 1.6 */ public Long zCount(byte[] key, Range range) { return redisTemplate.execute(new RedisCallback<Long>() { @Override public Long doInRedis(RedisConnection redis) throws DataAccessException { return redis.zCount(key, range); } }); }