Class CompoundLock
java.lang.Object
org.aksw.commons.lock.LockBase
org.aksw.commons.lock.CompoundLock
- All Implemented Interfaces:
Lock
A lock that is made up of multiple locks.
For
tryLock(long, TimeUnit) to succeed this method must succeed for all child locks.
On failure any acquired locks are unlocked again.- Author:
- raven
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class LockBase
lock, lockInterruptibly, newCondition, tryLock
-
Field Details
-
locks
-
heldLocks
protected int heldLocks
-
-
Constructor Details
-
CompoundLock
-
-
Method Details
-
tryLock
- Throws:
InterruptedException
-
unlock
public void unlock()
-