List of usage examples for org.springframework.data.redis.connection RedisConnection rPop
@Nullable byte[] rPop(byte[] key);
From source file:com.mauersu.util.redis.DefaultListOperations.java
public V rightPop(K key) { return execute(new ValueDeserializingRedisCallback(key) { protected byte[] inRedis(byte[] rawKey, RedisConnection connection) { connection.select(dbIndex);//from w w w . ja v a 2 s .c om return connection.rPop(rawKey); } }, true); }
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Removes and returns last element in list stored at {@code key}. * <p>//from www . jav a 2 s . c o m * See http://redis.io/commands/rpop * * @param key key * @return byte[] */ public static byte[] rPop(byte[] key) { return redisTemplate.execute(new RedisCallback<byte[]>() { @Override public byte[] doInRedis(RedisConnection redis) throws DataAccessException { return redis.rPop(key); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Removes and returns last element in list stored at {@code key}. * <p>/*ww w . j ava 2s . com*/ * See http://redis.io/commands/rpop * * @param key key * @return byte[] */ public byte[] rPop(byte[] key) { return redisTemplate.execute(new RedisCallback<byte[]>() { @Override public byte[] doInRedis(RedisConnection redis) throws DataAccessException { return redis.rPop(key); } }); }