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

Method getAndSet

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

将给定 key 的值设为 value ,并返回 key 的旧值(old value) @param key @param value @return

(String key, String value)

Source from the content-addressed store, hash-verified

233 * @return
234 */
235 public String getAndSet(String key, String value) {
236 return redisTemplate.opsForValue().getAndSet(key, value);
237 }
238
239 /**
240 * 对 key 所储存的字符串值,获取指定偏移量上的位(bit)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected