软件包 | 描述 |
---|---|
java.util.concurrent.locks |
接口和类提供了一个锁定和等待条件的框架,这种情况与内置的同步和监视器不同。
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractQueuedLongSynchronizer.ConditionObject
一
AbstractQueuedLongSynchronizer 作为一个
Lock 实施的基础条件的实现。
|
class |
AbstractQueuedSynchronizer.ConditionObject
一
AbstractQueuedSynchronizer 作为一个
Lock 实施的基础条件的实现。
|
Modifier and Type | Method and Description |
---|---|
Condition |
ReentrantLock.newCondition()
|
Condition |
ReentrantReadWriteLock.ReadLock.newCondition()
把
UnsupportedOperationException 因为
ReadLocks 不支持条件。
|
Condition |
ReentrantReadWriteLock.WriteLock.newCondition()
|
Condition |
Lock.newCondition()
返回一个新的
Condition 实例绑定到该
Lock 实例。
|
Modifier and Type | Method and Description |
---|---|
protected Collection<Thread> |
ReentrantLock.getWaitingThreads(Condition condition)
返回一个集合,包含可能在与此锁关联的给定条件下等待的线程集合。
|
protected Collection<Thread> |
ReentrantReadWriteLock.getWaitingThreads(Condition condition)
返回包含这些线程的集合,这些线程可能在与写锁关联的给定条件下等待。
|
int |
ReentrantLock.getWaitQueueLength(Condition condition)
返回在与此锁关联的给定条件下等待的线程数的估计值。
|
int |
ReentrantReadWriteLock.getWaitQueueLength(Condition condition)
返回在与写锁关联的给定条件下等待的线程数的估计值。
|
boolean |
ReentrantLock.hasWaiters(Condition condition)
查询是否有任何线程在与此锁关联的给定条件下等待。
|
boolean |
ReentrantReadWriteLock.hasWaiters(Condition condition)
查询是否有任何线程在与写锁关联的给定条件下等待。
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.