org.eclipse.net4j.util.concurrent
Class RWLock

java.lang.Object
  extended by java.util.concurrent.locks.ReentrantReadWriteLock
      extended by org.eclipse.net4j.util.concurrent.RWLock
All Implemented Interfaces:
Serializable, ReadWriteLock

public class RWLock
extends ReentrantReadWriteLock

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.concurrent.locks.ReentrantReadWriteLock
ReentrantReadWriteLock.ReadLock, ReentrantReadWriteLock.WriteLock
 
Constructor Summary
RWLock(long timeoutMillis)
           
RWLock(long timeoutMillis, boolean fair)
           
 
Method Summary
static
<V> V
call(Callable<V> callable, Lock lock, long timeoutMillis)
           
<V> V
read(Callable<V> callable)
           
 void read(Runnable runnable)
           
static void run(Runnable runnable, Lock lock, long timeoutMillis)
           
<V> V
write(Callable<V> callable)
           
 void write(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(Callable<V> callable)

read

public void read(Runnable runnable)

write

public <V> V write(Callable<V> callable)

write

public void write(Runnable runnable)

call

public static <V> V call(Callable<V> callable,
                         Lock lock,
                         long timeoutMillis)

run

public static void run(Runnable runnable,
                       Lock lock,
                       long timeoutMillis)


Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.