本文整理了Java中redis.clients.jedis.Jedis.incrByFloat()
方法的一些代码示例,展示了Jedis.incrByFloat()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jedis.incrByFloat()
方法的具体详情如下:
包路径:redis.clients.jedis.Jedis
类名称:Jedis
方法名:incrByFloat
[英]INCRBYFLOAT
INCRBYFLOAT commands are limited to double precision floating point values.
Note: this is actually a string operation, that is, in Redis there are not "double" types. Simply the string stored at the key is parsed as a base double precision floating point value, incremented, and then converted back as a string. There is no DECRYBYFLOAT but providing a negative value will work as expected.
Time complexity: O(1)
[中]不堪重负
INCRBYFLOAT命令仅限于双精度浮点值。
注意:这实际上是一个字符串操作,也就是说,在Redis中没有“double”类型。只需将存储在键上的字符串解析为基本双精度浮点值,递增,然后转换回字符串即可。没有DECRYBYFLOAT,但提供负值将按预期工作。
时间复杂度:O(1)
代码示例来源:origin: sohutv/cachecloud
@Override
public Double execute(Jedis connection) {
return connection.incrByFloat(key, value);
}
}.runBinary(key);
代码示例来源:origin: sohutv/cachecloud
@Override
public Double execute(Jedis connection) {
return connection.incrByFloat(key, value);
}
}.run(key);
代码示例来源:origin: sohutv/cachecloud
@Override
public Double incrByFloat(byte[] key, double integer) {
Jedis j = getShard(key);
return j.incrByFloat(key, integer);
}
代码示例来源:origin: sohutv/cachecloud
@Override
public Double incrByFloat(String key, double integer) {
Jedis j = getShard(key);
return j.incrByFloat(key, integer);
}
代码示例来源:origin: Netflix/conductor
@Override
public Double incrByFloat(String key, double value) {
Jedis jedis = null;
try {
jedis = jedisPool.getResource();
return jedis.incrByFloat(key, value);
} finally {
if (jedis != null)
jedis.close();
}
}
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public Double incrBy(byte[] key, double value) {
Assert.notNull(key, "Key must not be null!");
try {
if (isPipelined()) {
pipeline(connection.newJedisResult(connection.getRequiredPipeline().incrByFloat(key, value)));
return null;
}
if (isQueueing()) {
transaction(connection.newJedisResult(connection.getRequiredTransaction().incrByFloat(key, value)));
return null;
}
return connection.getJedis().incrByFloat(key, value);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Double execute(Jedis connection) {
return connection.incrByFloat(key, increment);
}
}.runBinary(key);
代码示例来源:origin: tangyanbo/springmore
@Override
public Double action(Jedis jedis) {
return jedis.incrByFloat(key, increment);
}
});
代码示例来源:origin: io.leopard/leopard-redis
@Override
public Double incrByFloat(String key, double value) {
return jedis.incrByFloat(key, value);
}
代码示例来源:origin: mindwind/craft-atom
private Double incrbyfloat0(Jedis j, String key, double increment) {
return j.incrByFloat(key, increment);
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Double execute(Jedis connection) {
return connection.incrByFloat(key, increment);
}
}.run(key);
代码示例来源:origin: io.leopard/leopard-redis
@Override
public Double incrByFloat(String key, double value) {
return jedis.incrByFloat(key, value);
}
代码示例来源:origin: penggle/jedis-ms-sentinel
public Double incrByFloat(byte[] key, double value) {
return master.incrByFloat(key, value);
}
代码示例来源:origin: penggle/jedis-ms-sentinel
public Double incrByFloat(String key, double integer) {
return master.incrByFloat(key, integer);
}
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public Double incrByFloat(byte[] key, double integer) {
String command = "incrByFloat";
return instrumented(command, () -> delegated.incrByFloat(key, integer));
}
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public Double incrByFloat(String key, double value) {
String command = "incrByFloat";
return instrumented(command, () -> delegated.incrByFloat(key, value));
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Double incrByFloat(final String key, final double increment) {
Jedis j = getShard(key);
return j.incrByFloat(key, increment);
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Double incrByFloat(final byte[] key, final double increment) {
Jedis j = getShard(key);
return j.incrByFloat(key, increment);
}
代码示例来源:origin: io.enoa/nosql-redis
default Double incrbyfloat(String key, double value) {
return this.run((jedis, serializer) -> jedis.incrByFloat(key, value));
}
代码示例来源:origin: com.netflix.conductor/conductor-redis-persistence
@Override
public Double incrByFloat(String key, double value) {
Jedis jedis = null;
try {
jedis = jedisPool.getResource();
return jedis.incrByFloat(key, value);
} finally {
if (jedis != null)
jedis.close();
}
}
内容来源于网络,如有侵权,请联系作者删除!