public final class StandaloneExclusiveLock extends ReentrantLock
| 构造器和说明 |
|---|
StandaloneExclusiveLock() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
isLocked() |
boolean |
tryLock(long timeout,
TimeUnit unit) |
void |
unlock() |
getHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isHeldByCurrentThread, lock, lockInterruptibly, newCondition, toString, tryLockpublic boolean tryLock(long timeout,
TimeUnit unit)
throws InterruptedException
tryLock 在接口中 LocktryLock 在类中 ReentrantLockInterruptedExceptionpublic void unlock()
unlock 在接口中 Lockunlock 在类中 ReentrantLockpublic boolean isLocked()
isLocked 在类中 ReentrantLockCopyright © 2022 The Apache Software Foundation. All rights reserved.