class SingleLock extends java.lang.Object implements ResourceLock
| Modifier and Type | Class and Description |
|---|---|
private class |
SingleLock.SingleLockManagedBlocker |
| Modifier and Type | Field and Description |
|---|---|
private java.util.concurrent.locks.Lock |
lock |
| Constructor and Description |
|---|
SingleLock(java.util.concurrent.locks.Lock lock) |
| Modifier and Type | Method and Description |
|---|---|
ResourceLock |
acquire()
Acquire this resource lock, potentially blocking.
|
(package private) java.util.concurrent.locks.Lock |
getLock() |
void |
release()
Release this resource lock.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclosejava.util.concurrent.locks.Lock getLock()
public ResourceLock acquire() throws java.lang.InterruptedException
ResourceLockacquire in interface ResourceLockjava.lang.InterruptedException - if the calling thread is interrupted
while waiting to acquire this lockpublic void release()
ResourceLockrelease in interface ResourceLock