Example usage for org.springframework.data.redis.connection RedisConnection zRangeByLex

List of usage examples for org.springframework.data.redis.connection RedisConnection zRangeByLex

Introduction

In this page you can find the example usage for org.springframework.data.redis.connection RedisConnection zRangeByLex.

Prototype

@Nullable
default Set<byte[]> zRangeByLex(byte[] key) 

Source Link

Document

Get all the elements in the sorted set at key in lexicographical ordering.

Usage

From source file:com.zxy.commons.cache.RedisUtils.java

/**
 * Get all the elements in the sorted set at {@literal key} in lexicographical ordering.
 * /*from w  w w. j av a  2s.  co m*/
 * @param key must not be {@literal null}.
 * @return Set<byte[]
 * @since 1.6
 */
public static Set<byte[]> zRangeByLex(byte[] key) {
    return redisTemplate.execute(new RedisCallback<Set<byte[]>>() {
        @Override
        public Set<byte[]> doInRedis(RedisConnection redis) throws DataAccessException {
            return redis.zRangeByLex(key);
        }
    });
}

From source file:com.zxy.commons.cache.RedisHelper.java

/**
 * Get all the elements in the sorted set at {@literal key} in lexicographical ordering.
 * /*from  w  w w  .  ja v a  2  s  .  c om*/
 * @param key must not be {@literal null}.
 * @return Set<byte[]
 * @since 1.6
 */
public Set<byte[]> zRangeByLex(byte[] key) {
    return redisTemplate.execute(new RedisCallback<Set<byte[]>>() {
        @Override
        public Set<byte[]> doInRedis(RedisConnection redis) throws DataAccessException {
            return redis.zRangeByLex(key);
        }
    });
}