public class RWLock
extends java.util.concurrent.locks.ReentrantReadWriteLock
Constructor and Description |
---|
RWLock(long timeoutMillis) |
RWLock(long timeoutMillis,
boolean fair) |
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) |
getOwner, getQueuedReaderThreads, getQueuedThreads, getQueuedWriterThreads, getQueueLength, getReadHoldCount, getReadLockCount, getWaitingThreads, getWaitQueueLength, getWriteHoldCount, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isWriteLocked, isWriteLockedByCurrentThread, readLock, toString, writeLock
public RWLock(long timeoutMillis)
public RWLock(long timeoutMillis, boolean fair)
public <V> V read(java.util.concurrent.Callable<V> callable)
public void read(java.lang.Runnable runnable)
public <V> V write(java.util.concurrent.Callable<V> callable)
public void write(java.lang.Runnable runnable)
public static <V> V call(java.util.concurrent.Callable<V> callable, java.util.concurrent.locks.Lock lock, long timeoutMillis)
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