List of usage examples for org.springframework.data.redis.connection RedisConnection lLen
@Nullable
Long lLen(byte[] key);
From source file:com.mauersu.util.redis.DefaultListOperations.java
public Long size(K key) { final byte[] rawKey = rawKey(key); return execute(new RedisCallback<Long>() { public Long doInRedis(RedisConnection connection) { connection.select(dbIndex);//ww w .j av a 2s . c o m return connection.lLen(rawKey); } }, true); }
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Get the size of list stored at {@code key}. * <p>/*from w w w. j a va 2s.co m*/ * See http://redis.io/commands/llen * * @param key key * @return Long */ public static Long lLen(byte[] key) { return redisTemplate.execute(new RedisCallback<Long>() { @Override public Long doInRedis(RedisConnection redis) throws DataAccessException { return redis.lLen(key); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Get the size of list stored at {@code key}. * <p>/* w ww. ja va 2 s .c o m*/ * See http://redis.io/commands/llen * * @param key key * @return Long */ public Long lLen(byte[] key) { return redisTemplate.execute(new RedisCallback<Long>() { @Override public Long doInRedis(RedisConnection redis) throws DataAccessException { return redis.lLen(key); } }); }