MCPcopy Create free account
hub / github.com/burhanxz/Distributed-KV / RedisDistributedLock

Class RedisDistributedLock

rpc/src/rpc/lock/RedisDistributedLock.java:18–113  ·  view source on GitHub ↗

@author bird redis方式实现的分布式锁 原理是利用setnx动作。由于setnx只能在值不存在的时候写入,一旦写入值之后就无法再写入, 不同节点上的相同方法被调用时,可利用setnx动作来模拟互斥操作

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

getPoolMethod · 0.95

Tested by

no test coverage detected