public class DeputyLock extends Object implements TrackingLock
| Constructor and Description |
|---|
DeputyLock(Lock master,
boolean masterLocked,
boolean canNotBeLocked,
String msg) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isLocked() |
void |
lock() |
void |
lockInterruptibly() |
Condition |
newCondition() |
boolean |
tryLock() |
boolean |
tryLock(long time,
TimeUnit unit) |
void |
unlock() |
public DeputyLock(Lock master, boolean masterLocked, boolean canNotBeLocked, String msg)
public void lockInterruptibly() throws InterruptedException
lockInterruptibly in interface LockInterruptedExceptionpublic boolean tryLock(long time, TimeUnit unit) throws InterruptedException
tryLock in interface LockInterruptedExceptionpublic boolean isLocked()
isLocked in interface TrackingLockpublic Condition newCondition()
newCondition in interface Lock