public class Locker extends Object
Convenience auto closeable ReentrantLock
wrapper.
try (Locker.Lock lock = locker.lock()) { // something }
Modifier and Type | Class and Description |
---|---|
class |
Locker.Lock
The unlocker object that unlocks when it is closed.
|
class |
Locker.UnLock
Deprecated.
|
Constructor and Description |
---|
Locker() |
Modifier and Type | Method and Description |
---|---|
boolean |
isLocked() |
Locker.Lock |
lock()
Acquires the lock.
|
Locker.Lock |
lockIfNotHeld()
Deprecated.
use
lock() instead |
Condition |
newCondition() |
public Locker.Lock lock()
Acquires the lock.
@Deprecated public Locker.Lock lockIfNotHeld()
lock()
insteadpublic boolean isLocked()
Copyright © 2010 - 2020 Adobe. All Rights Reserved