org.eclipse.net4j.util.concurrent

## Class RWLock

- java.lang.Object
- - java.util.concurrent.locks.ReentrantReadWriteLock
  - - org.eclipse.net4j.util.concurrent.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 and Description
    `RWLock(long timeoutMillis)`
    `RWLock(long timeoutMillis, boolean fair)`

  - ### Method Summary

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

    - ### 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)

Copyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html