public final class NonReentrantLock
extends java.util.concurrent.locks.AbstractQueuedSynchronizer
implements java.util.concurrent.locks.Lock
| 构造器和说明 |
|---|
NonReentrantLock() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
isHeldByCurrentThread() |
protected boolean |
isHeldExclusively() |
void |
lock() |
void |
lockInterruptibly() |
java.util.concurrent.locks.Condition |
newCondition() |
protected boolean |
tryAcquire(int acquires) |
boolean |
tryLock() |
boolean |
tryLock(long time,
java.util.concurrent.TimeUnit unit) |
protected boolean |
tryRelease(int releases) |
void |
unlock() |
acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedPredecessors, hasQueuedThreads, hasWaiters, isQueued, owns, release, releaseShared, setState, toString, tryAcquireNanos, tryAcquireShared, tryAcquireSharedNanos, tryReleaseSharedpublic void lock()
lock 在接口中 java.util.concurrent.locks.Lockpublic void lockInterruptibly()
throws java.lang.InterruptedException
lockInterruptibly 在接口中 java.util.concurrent.locks.Lockjava.lang.InterruptedExceptionpublic boolean tryLock()
tryLock 在接口中 java.util.concurrent.locks.Lockpublic boolean tryLock(long time,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
tryLock 在接口中 java.util.concurrent.locks.Lockjava.lang.InterruptedExceptionpublic void unlock()
unlock 在接口中 java.util.concurrent.locks.Lockpublic boolean isHeldByCurrentThread()
public java.util.concurrent.locks.Condition newCondition()
newCondition 在接口中 java.util.concurrent.locks.Lockprotected boolean tryAcquire(int acquires)
tryAcquire 在类中 java.util.concurrent.locks.AbstractQueuedSynchronizerprotected boolean tryRelease(int releases)
tryRelease 在类中 java.util.concurrent.locks.AbstractQueuedSynchronizerprotected boolean isHeldExclusively()
isHeldExclusively 在类中 java.util.concurrent.locks.AbstractQueuedSynchronizer