Package org.eclipse.jetty.util.thread
Class Locker
- java.lang.Object
-
- org.eclipse.jetty.util.thread.Locker
-
@Deprecated(since="2021-05-27") public class Locker extends java.lang.ObjectDeprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.Convenience auto closeable
ReentrantLockwrapper.try (Locker.Lock lock = locker.lock()) { // something }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classLocker.LockDeprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.classLocker.UnLockDeprecated.
-
Constructor Summary
Constructors Constructor Description Locker()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanisLocked()Deprecated.Locker.Locklock()Deprecated.Acquires the lock.Locker.LocklockIfNotHeld()Deprecated.uselock()insteadjava.util.concurrent.locks.ConditionnewCondition()Deprecated.
-
-
-
Method Detail
-
lock
public Locker.Lock lock()
Deprecated.Acquires the lock.
- Returns:
- the lock to unlock
-
lockIfNotHeld
@Deprecated public Locker.Lock lockIfNotHeld()
Deprecated.uselock()instead- Returns:
- the lock to unlock
-
isLocked
public boolean isLocked()
Deprecated.- Returns:
- whether this lock has been acquired
-
newCondition
public java.util.concurrent.locks.Condition newCondition()
Deprecated.- Returns:
- a
Conditionassociated with this lock
-
-