List of usage examples for org.springframework.data.redis.connection RedisConnection decrBy
@Nullable Long decrBy(byte[] key, long value);
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Increment value of {@code key} by {@code value}. * <p>/*from w ww . j a v a 2s .c om*/ * See http://redis.io/commands/decrby * * @param key must not be {@literal null}. * @param value value * @return Long */ public static Long decrBy(byte[] key, long value) { return redisTemplate.execute(new RedisCallback<Long>() { @Override public Long doInRedis(RedisConnection redis) throws DataAccessException { return redis.decrBy(key, value); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Increment value of {@code key} by {@code value}. * <p>//from www. ja va2s .c o m * See http://redis.io/commands/decrby * * @param key must not be {@literal null}. * @param value value * @return Long */ public Long decrBy(byte[] key, long value) { return redisTemplate.execute(new RedisCallback<Long>() { @Override public Long doInRedis(RedisConnection redis) throws DataAccessException { return redis.decrBy(key, value); } }); }