public class AutoCloseableReentrantLock extends ReentrantLock implements AutoCloseable
try (AutoCloseableReentrantLock lock = lock.open()) {
// Do stuff
}
| Constructor and Description |
|---|
AutoCloseableReentrantLock() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
AutoCloseableReentrantLock |
open() |
getHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isHeldByCurrentThread, isLocked, lock, lockInterruptibly, newCondition, toString, tryLock, tryLock, unlockpublic AutoCloseableReentrantLock open()
public void close()
close in interface AutoCloseableCopyright © 2016 LSST. All rights reserved.