redis.clients.jedis.Jedis.setbit()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(217)

本文整理了Java中redis.clients.jedis.Jedis.setbit()方法的一些代码示例,展示了Jedis.setbit()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jedis.setbit()方法的具体详情如下:
包路径:redis.clients.jedis.Jedis
类名称:Jedis
方法名:setbit

Jedis.setbit介绍

[英]Sets or clears the bit at offset in the string value stored at key
[中]设置或清除键处存储的字符串值中偏移量处的位

代码示例

代码示例来源:origin: sohutv/cachecloud

@Override
 public Boolean execute(Jedis connection) {
  return connection.setbit(key, offset, value);
 }
}.run(key);

代码示例来源:origin: sohutv/cachecloud

@Override
 public Boolean execute(Jedis connection) {
  return connection.setbit(key, offset, value);
 }
}.run(key);

代码示例来源:origin: sohutv/cachecloud

@Override
 public Boolean execute(Jedis connection) {
  return connection.setbit(key, offset, value);
 }
}.runBinary(key);

代码示例来源:origin: sohutv/cachecloud

@Override
 public Boolean execute(Jedis connection) {
  return connection.setbit(key, offset, value);
 }
}.runBinary(key);

代码示例来源:origin: sohutv/cachecloud

public Boolean execute(Jedis connection) {
    return connection.setbit(keyByte, offset, value);
  }
}.runBinary(keyByte);

代码示例来源:origin: sohutv/cachecloud

@Override
public Boolean setbit(byte[] key, long offset, byte[] value) {
 Jedis j = getShard(key);
 return j.setbit(key, offset, value);
}

代码示例来源:origin: sohutv/cachecloud

@Override
public Boolean setbit(String key, long offset, boolean value) {
 Jedis j = getShard(key);
 return j.setbit(key, offset, value);
}

代码示例来源:origin: sohutv/cachecloud

@Override
public Boolean setbit(byte[] key, long offset, boolean value) {
 Jedis j = getShard(key);
 return j.setbit(key, offset, value);
}

代码示例来源:origin: sohutv/cachecloud

@Override
public Boolean setbit(String key, long offset, String value) {
 Jedis j = getShard(key);
 return j.setbit(key, offset, value);
}

代码示例来源:origin: Netflix/conductor

@Override
public Boolean setbit(String key, long offset, boolean value) {
 Jedis jedis = null;
 try {
  jedis = jedisPool.getResource();
  return jedis.setbit(key, offset, value);
 } finally {
  if (jedis != null)
   jedis.close();
 }
}

代码示例来源:origin: Netflix/conductor

@Override
public Boolean setbit(String key, long offset, String value) {
 Jedis jedis = null;
 try {
  jedis = jedisPool.getResource();
  return jedis.setbit(key, offset, value);
 } finally {
  if (jedis != null)
   jedis.close();
 }
}

代码示例来源:origin: spring-projects/spring-data-redis

@Override
public Boolean setBit(byte[] key, long offset, boolean value) {
  Assert.notNull(key, "Key must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection
          .newJedisResult(connection.getRequiredPipeline().setbit(key, offset, JedisConverters.toBit(value))));
      return null;
    }
    if (isQueueing()) {
      transaction(connection
          .newJedisResult(connection.getRequiredTransaction().setbit(key, offset, JedisConverters.toBit(value))));
      return null;
    }
    return connection.getJedis().setbit(key, offset, JedisConverters.toBit(value));
  } catch (Exception ex) {
    throw convertJedisAccessException(ex);
  }
}

代码示例来源:origin: io.leopard/leopard-redis

@Override
  public Object execute(Jedis jedis) {
    return jedis.setbit(key, offset, value);
  }
});

代码示例来源:origin: Baqend/Orestes-Bloomfilter

@Override
public void set(int bitIndex, boolean value) {
  pool.safelyDo(jedis -> jedis.setbit(name, bitIndex, value));
}

代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis

@Override
public Boolean setbit(String key, long offset, boolean value) {
 String command = "setbit";
 return instrumented(command, () -> delegated.setbit(key, offset, value));
}

代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis

@Override
public Boolean setbit(byte[] key, long offset, boolean value) {
 String command = "setbit";
 return instrumented(command, () -> delegated.setbit(key, offset, value));
}

代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis

@Override
public Boolean setbit(String key, long offset, String value) {
 String command = "setbit";
 return instrumented(command, payloadSize(value), () -> delegated.setbit(key, offset, value));
}

代码示例来源:origin: org.nutz/nutz-integration-jedis

public Boolean setbit(String key, long offset, String value) {
  Jedis jedis = getJedis();
  try {
    return jedis.setbit(key, offset, value);
  } finally {Streams.safeClose(jedis);}
}

代码示例来源:origin: org.nutz/nutz-integration-jedis

public Boolean setbit(byte[] key, long offset, byte[] value) {
  Jedis jedis = getJedis();
  try {
    return jedis.setbit(key, offset, value);
  } finally {Streams.safeClose(jedis);}
}

代码示例来源:origin: pyloque/captain

public void releaseId(String name, int id) {
  String key = keyFor(name);
  redis.execute(jedis -> {
    jedis.setbit(key, id, false);
  });
}

相关文章

Jedis类方法