Class Locker
java.lang.Object
org.eclipse.jetty.util.thread.Locker
Convenience auto closeable ReentrantLock wrapper.
try (Locker.Lock lock = locker.lock())
{
// something
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassThe unlocker object that unlocks when it is closed.classDeprecated. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
_lock
-
_unlock
-
-
Constructor Details
-
Locker
public Locker()
-
-
Method Details
-
lock
-
lockIfNotHeld
Deprecated.uselock()instead- Returns:
- the lock to unlock
-
isLocked
public boolean isLocked()- Returns:
- whether this lock has been acquired
-
newCondition
-
lock()instead