Class Locker


  • @Deprecated(since="2021-05-27")
    public class Locker
    extends java.lang.Object
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.

    Convenience auto closeable ReentrantLock wrapper.

      try (Locker.Lock lock = locker.lock())
      {
        // something
      }
      
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  Locker.Lock
      Deprecated.
      The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
      class  Locker.UnLock
      Deprecated.
    • Constructor Summary

      Constructors 
      Constructor Description
      Locker()
      Deprecated.
       
    • Constructor Detail

      • Locker

        public Locker()
        Deprecated.
    • Method Detail

      • lock

        public Locker.Lock lock()
        Deprecated.

        Acquires the lock.

        Returns:
        the lock to unlock
      • lockIfNotHeld

        @Deprecated
        public Locker.Lock lockIfNotHeld()
        Deprecated.
        use lock() 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 Condition associated with this lock