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, tryReleaseShared
public void lock()
lock
在接口中 java.util.concurrent.locks.Lock
public void lockInterruptibly() throws java.lang.InterruptedException
lockInterruptibly
在接口中 java.util.concurrent.locks.Lock
java.lang.InterruptedException
public boolean tryLock()
tryLock
在接口中 java.util.concurrent.locks.Lock
public boolean tryLock(long time, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
tryLock
在接口中 java.util.concurrent.locks.Lock
java.lang.InterruptedException
public void unlock()
unlock
在接口中 java.util.concurrent.locks.Lock
public boolean isHeldByCurrentThread()
public java.util.concurrent.locks.Condition newCondition()
newCondition
在接口中 java.util.concurrent.locks.Lock
protected boolean tryAcquire(int acquires)
tryAcquire
在类中 java.util.concurrent.locks.AbstractQueuedSynchronizer
protected boolean tryRelease(int releases)
tryRelease
在类中 java.util.concurrent.locks.AbstractQueuedSynchronizer
protected boolean isHeldExclusively()
isHeldExclusively
在类中 java.util.concurrent.locks.AbstractQueuedSynchronizer