class CompositeLock extends java.lang.Object implements ResourceLock
Modifier and Type | Class and Description |
---|---|
private class |
CompositeLock.CompositeLockManagedBlocker |
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.util.concurrent.locks.Lock> |
locks |
Constructor and Description |
---|
CompositeLock(java.util.List<java.util.concurrent.locks.Lock> locks) |
Modifier and Type | Method and Description |
---|---|
ResourceLock |
acquire()
Acquire this resource lock, potentially blocking.
|
private void |
acquireAllLocks() |
(package private) java.util.List<java.util.concurrent.locks.Lock> |
getLocks() |
void |
release()
Release this resource lock.
|
private void |
release(java.util.List<java.util.concurrent.locks.Lock> acquiredLocks) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
CompositeLock(java.util.List<java.util.concurrent.locks.Lock> locks)
java.util.List<java.util.concurrent.locks.Lock> getLocks()
public ResourceLock acquire() throws java.lang.InterruptedException
ResourceLock
acquire
in interface ResourceLock
java.lang.InterruptedException
- if the calling thread is interrupted
while waiting to acquire this lockprivate void acquireAllLocks() throws java.lang.InterruptedException
java.lang.InterruptedException
public void release()
ResourceLock
release
in interface ResourceLock
private void release(java.util.List<java.util.concurrent.locks.Lock> acquiredLocks)