Package kilim

Class ReentrantLock

  • All Implemented Interfaces:
    java.io.Serializable, java.util.concurrent.locks.Lock

    public class ReentrantLock
    extends java.util.concurrent.locks.ReentrantLock
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.lang.Thread locker  
      private static long serialVersionUID  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void checkPin()  
      java.lang.Thread getOwner()  
      void lock()  
      void preLock()  
      boolean tryLock()  
      boolean tryLock​(long timeout, java.util.concurrent.TimeUnit unit)  
      void unlock()  
      • Methods inherited from class java.util.concurrent.locks.ReentrantLock

        getHoldCount, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isHeldByCurrentThread, isLocked, lockInterruptibly, newCondition, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • locker

        java.lang.Thread locker
    • Constructor Detail

      • ReentrantLock

        public ReentrantLock()
      • ReentrantLock

        public ReentrantLock​(boolean fair)
    • Method Detail

      • getOwner

        public java.lang.Thread getOwner()
        Overrides:
        getOwner in class java.util.concurrent.locks.ReentrantLock
      • checkPin

        protected void checkPin()
      • lock

        public void lock()
        Specified by:
        lock in interface java.util.concurrent.locks.Lock
        Overrides:
        lock in class java.util.concurrent.locks.ReentrantLock
      • tryLock

        public boolean tryLock()
        Specified by:
        tryLock in interface java.util.concurrent.locks.Lock
        Overrides:
        tryLock in class java.util.concurrent.locks.ReentrantLock
      • tryLock

        public boolean tryLock​(long timeout,
                               java.util.concurrent.TimeUnit unit)
                        throws java.lang.InterruptedException
        Specified by:
        tryLock in interface java.util.concurrent.locks.Lock
        Overrides:
        tryLock in class java.util.concurrent.locks.ReentrantLock
        Throws:
        java.lang.InterruptedException
      • unlock

        public void unlock()
        Specified by:
        unlock in interface java.util.concurrent.locks.Lock
        Overrides:
        unlock in class java.util.concurrent.locks.ReentrantLock