MCPcopy Create free account
hub / github.com/PlexPt/rocket-pt / setBit

Method setBit

src/main/java/com/rocketpt/server/util/RedisUtil.java:268–270  ·  view source on GitHub ↗

设置ASCII码, 字符串'a'的ASCII码是97, 转为二进制是'01100001', 此方法是将二进制第offset位值变为value @param key @param postion 位置 @param value 值,true为1, false为0 @return

(String key, long offset, boolean value)

Source from the content-addressed store, hash-verified

266 * @return
267 */
268 public boolean setBit(String key, long offset, boolean value) {
269 return redisTemplate.opsForValue().setBit(key, offset, value);
270 }
271
272 /**
273 * 将值 value 关联到 key ,并将 key 的过期时间设为 timeout

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected