public static class DefaultLockFactory.DefaultLock extends java.lang.Object implements LockFactory.StatefulLock
Constructor and Description |
---|
DefaultLock() |
Modifier and Type | Method and Description |
---|---|
boolean |
isHeldByCurrentThread() |
void |
lock() |
boolean |
tryLock() |
boolean |
tryLock(long time,
java.util.concurrent.TimeUnit unit) |
void |
unlock() |
public void lock()
lock
in interface LockFactory.StatefulLock
public void unlock()
unlock
in interface LockFactory.StatefulLock
public boolean isHeldByCurrentThread()
isHeldByCurrentThread
in interface LockFactory.StatefulLock
public boolean tryLock()
tryLock
in interface LockFactory.StatefulLock
public boolean tryLock(long time, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
tryLock
in interface LockFactory.StatefulLock
java.lang.InterruptedException