public class JGReadLock extends java.lang.Object implements ClusterFileLock
构造器和说明 |
---|
JGReadLock(java.lang.String path) |
public void lock() throws LockException
ClusterFileLock
lock
在接口中 ClusterFileLock
LockException
public boolean tryLock(long time, java.util.concurrent.TimeUnit unit) throws LockException
ClusterFileLock
tryLock
在接口中 ClusterFileLock
time
- 超时等待时间unit
- 时间单位LockException
public void release()
ClusterFileLock
release
在接口中 ClusterFileLock