本文整理了Java中redis.clients.jedis.Jedis.getbit()
方法的一些代码示例,展示了Jedis.getbit()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jedis.getbit()
方法的具体详情如下:
包路径:redis.clients.jedis.Jedis
类名称:Jedis
方法名:getbit
[英]Returns the bit value at offset in the string value stored at key
[中]返回键处存储的字符串值中偏移量处的位值
代码示例来源:origin: sohutv/cachecloud
@Override
public Boolean execute(Jedis connection) {
return connection.getbit(key, offset);
}
}.run(key);
代码示例来源:origin: sohutv/cachecloud
@Override
public Boolean execute(Jedis connection) {
return connection.getbit(key, offset);
}
}.runBinary(key);
代码示例来源:origin: sohutv/cachecloud
@Override
public Boolean getbit(byte[] key, long offset) {
Jedis j = getShard(key);
return j.getbit(key, offset);
}
代码示例来源:origin: sohutv/cachecloud
@Override
public Boolean getbit(String key, long offset) {
Jedis j = getShard(key);
return j.getbit(key, offset);
}
代码示例来源:origin: Netflix/conductor
@Override
public Boolean getbit(String key, long offset) {
Jedis jedis = null;
try {
jedis = jedisPool.getResource();
return jedis.getbit(key, offset);
} finally {
if (jedis != null)
jedis.close();
}
}
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public Boolean getBit(byte[] key, long offset) {
Assert.notNull(key, "Key must not be null!");
try {
if (isPipelined()) {
pipeline(connection.newJedisResult(connection.getRequiredPipeline().getbit(key, offset)));
return null;
}
if (isQueueing()) {
transaction(connection.newJedisResult(connection.getRequiredTransaction().getbit(key, offset)));
return null;
}
// compatibility check for Jedis 2.0.0
Object getBit = connection.getJedis().getbit(key, offset);
// Jedis 2.0
if (getBit instanceof Long) {
return (((Long) getBit) == 0 ? Boolean.FALSE : Boolean.TRUE);
}
// Jedis 2.1
return ((Boolean) getBit);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: io.leopard/leopard-redis
@Override
public Object execute(Jedis jedis) {
return jedis.getbit(key, offset);
}
});
代码示例来源:origin: io.leopard/leopard-redis
@Override
public Boolean getbit(String key, long offset) {
return jedis.getbit(key, offset);
}
代码示例来源:origin: yrain/smart-cache
@Override
Boolean doInJedis(Jedis jedis) {
return jedis.getbit(key, offset);
}
});
代码示例来源:origin: apache/servicemix-bundles
@Override
public Boolean execute(Jedis connection) {
return connection.getbit(key, offset);
}
}.run(key);
代码示例来源:origin: apache/servicemix-bundles
@Override
public Boolean execute(Jedis connection) {
return connection.getbit(key, offset);
}
}.runBinary(key);
代码示例来源:origin: mindwind/craft-atom
private Boolean getbit0(Jedis j, String key, long offset) {
return j.getbit(key, offset);
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Boolean getbit(final String key, final long offset) {
Jedis j = getShard(key);
return j.getbit(key, offset);
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Boolean getbit(final byte[] key, final long offset) {
Jedis j = getShard(key);
return j.getbit(key, offset);
}
代码示例来源:origin: wxisme/bloomfilter
public boolean get(int bitIndex) {
if (this.isCluster) {
return this.jedisCluster.getbit(this.name, bitIndex);
} else {
return this.jedis.getbit(this.name, bitIndex);
}
}
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public Boolean getbit(String key, long offset) {
String command = "getbit";
return instrumented(command, () -> delegated.getbit(key, offset));
}
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public Boolean getbit(byte[] key, long offset) {
String command = "getbit";
return instrumented(command, () -> delegated.getbit(key, offset));
}
代码示例来源:origin: Baqend/Orestes-Bloomfilter
@Override
public boolean get(int bitIndex) {
return pool.allowingSlaves().safelyReturn(jedis -> jedis.getbit(name, bitIndex));
}
代码示例来源:origin: com.netflix.conductor/conductor-redis-persistence
@Override
public Boolean getbit(String key, long offset) {
Jedis jedis = null;
try {
jedis = jedisPool.getResource();
return jedis.getbit(key, offset);
} finally {
if (jedis != null)
jedis.close();
}
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
/**
* Returns the bit value at offset in the string value stored at key
*
* @param key
* @param offset
* @return
*/
public Boolean getbit(byte[] key, long offset) {
Jedis jedis = getJedis();
try {
return jedis.getbit(key, offset);
} finally {Streams.safeClose(jedis);}
}
内容来源于网络,如有侵权,请联系作者删除!