@Override public Long decr(final String key) { return jedisCluster.decr(key); }
@Override public Long decr(final String key) { return jedisCluster.decr(key); }
@Override public Long decr(final String key) { return jedisCluster.decr(key); }
@Override public Long decr(byte[] key) { Assert.notNull(key, "Key must not be null!"); try { return connection.getCluster().decr(key); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Long decr(String key) { return jedisCluster.decr(key); }
/** * 将 key 中储存的数字值减一 * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 DECR 操作 * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误 * @param key * @return 执行 DECR 命令之后 key 的值 */ public Long decr(String key){ return jedisCluster.decr(key); } /**
@Override public Long decr(byte[] bytes) { return cluster.decr(bytes); }
public Long decr(String key) { return jedisCluster.decr(key); }
public Long decr(byte[] key) { return jedisCluster.decr(key); }
/** * 将 key 中储存的数字值减一。 * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 DECR 操作。 * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 * 本操作的值限制在 64 位(bit)有符号数字表示之内。 * 关于递增(increment) / 递减(decrement)操作的更多信息,请参见 INCR 命令。 */ public Long decr(Object key) { return jedisCluster.decr(keyToBytes(key)); }
@Override public long decr(final String key) { Assert.hasText(key); try { final Long val = cluster.decr(key); if (val == null) { return 0; } return val.longValue(); } catch (final Throwable e) { throw new RedisClientException(e.getMessage(), e); } }
@Override public Long decr(byte[] key) { Assert.notNull(key, "Key must not be null!"); try { return connection.getCluster().decr(key); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Long decr(byte[] key) { Assert.notNull(key, "Key must not be null!"); try { return connection.getCluster().decr(key); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
/** * 将 key 中储存的数字值减一。 * 如果 key 不存在,那么 key 的值会先被初始化为 0 ,然后再执行 DECR 操作。 * 如果值包含错误的类型,或字符串类型的值不能表示为数字,那么返回一个错误。 * 返回值:执行 DECR 命令之后 key 的值。 */ public Long decr(Object key) { if (null == key) { return null; } if (cluster) { return jedisCluster.decr(serializeKey(key)); } else { return jedisOperator.decr(serializeKey(key)); } }