public class RWLock extends AbstractQueuedSynchronizer
AbstractQueuedSynchronizer.ConditionObject| Constructor and Description |
|---|
RWLock() |
| Modifier and Type | Method and Description |
|---|---|
void |
downgrade() |
RWLock |
lockRead() |
boolean |
lockRead(long timeout) |
RWLock |
lockWrite() |
boolean |
lockWrite(long timeout) |
protected int |
tryAcquireShared(int acquires) |
protected boolean |
tryReleaseShared(int releases) |
void |
unlock(boolean write) |
void |
unlockRead() |
void |
unlockWrite() |
acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedPredecessors, hasQueuedThreads, hasWaiters, isHeldExclusively, isQueued, owns, release, releaseShared, setState, toString, tryAcquire, tryAcquireNanos, tryAcquireSharedNanos, tryReleasegetExclusiveOwnerThread, setExclusiveOwnerThreadpublic final RWLock lockRead()
public final boolean lockRead(long timeout)
public final void unlockRead()
public final RWLock lockWrite()
public final boolean lockWrite(long timeout)
public final void unlockWrite()
public final void unlock(boolean write)
public final void downgrade()
protected int tryAcquireShared(int acquires)
tryAcquireShared in class AbstractQueuedSynchronizerprotected final boolean tryReleaseShared(int releases)
tryReleaseShared in class AbstractQueuedSynchronizerCopyright © 2019. All rights reserved.