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

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

Introduction

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

Prototype

@Nullable
List<byte[]> hVals(byte[] key);

Source Link

Document

Get entry set (values) of hash at field .

Usage

From source file:com.mauersu.util.redis.DefaultHashOperations.java

public List<HV> values(K key) {
    final byte[] rawKey = rawKey(key);

    List<byte[]> rawValues = execute(new RedisCallback<List<byte[]>>() {

        public List<byte[]> doInRedis(RedisConnection connection) {
            connection.select(dbIndex);//from   www. ja  v  a2 s . co  m
            return connection.hVals(rawKey);
        }
    }, true);

    return deserializeHashValues(rawValues);
}

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

/**
 * Get entry set (values) of hash at {@code field}.
 * /*from ww  w .  j  a v  a 2s.co m*/
 * @see http://redis.io/commands/hvals
 * @param key key
 * @return List<byte[]>
 */
public static List<byte[]> hVals(byte[] key) {
    return redisTemplate.execute(new RedisCallback<List<byte[]>>() {
        @Override
        public List<byte[]> doInRedis(RedisConnection redis) throws DataAccessException {
            return redis.hVals(key);
        }
    });
}

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

/**
 * Get entry set (values) of hash at {@code field}.
 * //from   w  w w  .  java  2s  .c  o m
 * @see http://redis.io/commands/hvals
 * @param key key
 * @return List<byte[]>
 */
public List<byte[]> hVals(byte[] key) {
    return redisTemplate.execute(new RedisCallback<List<byte[]>>() {
        @Override
        public List<byte[]> doInRedis(RedisConnection redis) throws DataAccessException {
            return redis.hVals(key);
        }
    });
}