Class RWLock

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

    public class RWLock
    extends java.util.concurrent.locks.ReentrantReadWriteLock
    Author:
    Eike Stepper
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.concurrent.locks.ReentrantReadWriteLock

        java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock, java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock
    • Constructor Summary

      Constructors 
      Constructor Description
      RWLock​(long timeoutMillis)  
      RWLock​(long timeoutMillis, boolean fair)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static <V> V call​(java.util.concurrent.Callable<V> callable, java.util.concurrent.locks.Lock lock, long timeoutMillis)  
      void read​(java.lang.Runnable runnable)  
      <V> V read​(java.util.concurrent.Callable<V> callable)  
      static void run​(java.lang.Runnable runnable, java.util.concurrent.locks.Lock lock, long timeoutMillis)  
      void write​(java.lang.Runnable runnable)  
      <V> V write​(java.util.concurrent.Callable<V> callable)  
      • Methods inherited from class java.util.concurrent.locks.ReentrantReadWriteLock

        getOwner, getQueuedReaderThreads, getQueuedThreads, getQueuedWriterThreads, getQueueLength, getReadHoldCount, getReadLockCount, getWaitingThreads, getWaitQueueLength, getWriteHoldCount, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isWriteLocked, isWriteLockedByCurrentThread, readLock, toString, writeLock
      • Methods inherited from class java.lang.Object

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

      • RWLock

        public RWLock​(long timeoutMillis)
      • RWLock

        public RWLock​(long timeoutMillis,
                      boolean fair)
    • Method Detail

      • read

        public <V> V read​(java.util.concurrent.Callable<V> callable)
      • read

        public void read​(java.lang.Runnable runnable)
      • write

        public <V> V write​(java.util.concurrent.Callable<V> callable)
      • write

        public void write​(java.lang.Runnable runnable)
      • call

        public static <V> V call​(java.util.concurrent.Callable<V> callable,
                                 java.util.concurrent.locks.Lock lock,
                                 long timeoutMillis)
      • run

        public static void run​(java.lang.Runnable runnable,
                               java.util.concurrent.locks.Lock lock,
                               long timeoutMillis)