Class SerReentrantLock

java.lang.Object
com.pnfsoftware.jeb.util.serialization.objects.SerReentrantLock
All Implemented Interfaces:
Lock

@Ser public class SerReentrantLock extends Object implements Lock
Wrapper for a Java ReentrantLock that supports serialization.
  • Constructor Details

    • SerReentrantLock

      public SerReentrantLock()
    • SerReentrantLock

      public SerReentrantLock(boolean fair)
  • Method Details

    • get

      public ReentrantLock get()
    • lock

      public void lock()
      Specified by:
      lock in interface Lock
    • unlock

      public void unlock()
      Specified by:
      unlock in interface Lock
    • isHeldByCurrentThread

      public boolean isHeldByCurrentThread()
    • lockInterruptibly

      public void lockInterruptibly() throws InterruptedException
      Specified by:
      lockInterruptibly in interface Lock
      Throws:
      InterruptedException
    • tryLock

      public boolean tryLock()
      Specified by:
      tryLock in interface Lock
    • tryLock

      public boolean tryLock(long timeout, TimeUnit unit) throws InterruptedException
      Specified by:
      tryLock in interface Lock
      Throws:
      InterruptedException
    • newCondition

      public Condition newCondition()
      Specified by:
      newCondition in interface Lock
    • getHoldCount

      public int getHoldCount()
    • isLocked

      public boolean isLocked()
    • isFair

      public final boolean isFair()
    • hasQueuedThreads

      public final boolean hasQueuedThreads()
    • hasQueuedThread

      public final boolean hasQueuedThread(Thread thread)
    • getQueueLength

      public final int getQueueLength()
    • hasWaiters

      public boolean hasWaiters(Condition condition)
    • getWaitQueueLength

      public int getWaitQueueLength(Condition condition)