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

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

Introduction

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

Prototype

@Nullable
byte[] dump(byte[] key);

Source Link

Document

Retrieve serialized version of the value stored at key .

Usage

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

/**
 * Retrieve serialized version of the value stored at {@code key}.
 * <p>/*from   w  w  w .  java  2  s.co m*/
 * See http://redis.io/commands/dump
 * 
 * @param key key
 * @return byte[]
 */
public static byte[] dump(byte[] key) {
    return redisTemplate.execute(new RedisCallback<byte[]>() {
        @Override
        public byte[] doInRedis(RedisConnection redis) throws DataAccessException {
            return redis.dump(key);
        }
    });
}

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

/**
 * Retrieve serialized version of the value stored at {@code key}.
 * <p>//  w ww .j  ava  2  s.com
 * See http://redis.io/commands/dump
 * 
 * @param key key
 * @return byte[]
 */
public byte[] dump(byte[] key) {
    return redisTemplate.execute(new RedisCallback<byte[]>() {
        @Override
        public byte[] doInRedis(RedisConnection redis) throws DataAccessException {
            return redis.dump(key);
        }
    });
}