public abstract class AbstractTrackingLock extends Object implements TrackingLock
| Constructor and Description |
|---|
AbstractTrackingLock(Lock master) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
decCounter() |
protected abstract int |
getCounter() |
protected abstract void |
incCounter() |
boolean |
isLocked() |
void |
lock() |
void |
lockInterruptibly() |
Condition |
newCondition() |
boolean |
tryLock() |
boolean |
tryLock(long time,
TimeUnit unit) |
void |
unlock() |
public AbstractTrackingLock(Lock master)
protected abstract void incCounter()
protected abstract void decCounter()
protected abstract int getCounter()
public boolean isLocked()
isLocked in interface TrackingLockpublic void lockInterruptibly() throws InterruptedException
lockInterruptibly in interface LockInterruptedExceptionpublic boolean tryLock(long time, TimeUnit unit) throws InterruptedException
tryLock in interface LockInterruptedExceptionpublic Condition newCondition()
newCondition in interface Lock