List of usage examples for org.springframework.data.redis.connection RedisConnection type
@Nullable
DataType type(byte[] key);
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Determine the type stored at {@code key}. * <p>/*from w w w .ja v a2 s .co m*/ * See http://redis.io/commands/type * * @param key key * @return DataType */ public static DataType type(byte[] key) { return redisTemplate.execute(new RedisCallback<DataType>() { @Override public DataType doInRedis(RedisConnection redis) throws DataAccessException { return redis.type(key); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Determine the type stored at {@code key}. * <p>//from w ww . jav a 2s .c o m * See http://redis.io/commands/type * * @param key key * @return DataType */ public DataType type(byte[] key) { return redisTemplate.execute(new RedisCallback<DataType>() { @Override public DataType doInRedis(RedisConnection redis) throws DataAccessException { return redis.type(key); } }); }