public class ZkReentrantLock extends Object implements DistributedReentrantLock
public ZkReentrantLock(org.apache.curator.framework.CuratorFramework client,
String lockId)
public void init(org.apache.curator.framework.CuratorFramework client,
String lockId)
public boolean tryLock(long timeout,
TimeUnit unit)
throws InterruptedException
DistributedReentrantLocktryLock 在接口中 DistributedReentrantLocktimeout - 超时时间unit - unitInterruptedException - 抛出异常public void unlock()
DistributedReentrantLockunlock 在接口中 DistributedReentrantLockCopyright © 2018 Pivotal Software, Inc.. All rights reserved.