软件包 | 描述 |
---|---|
java.util.concurrent.locks |
接口和类提供了一个锁定和等待条件的框架,这种情况与内置的同步和监视器不同。
|
Modifier and Type | Class and Description |
---|---|
class |
ReentrantLock
一个可重入的互斥
Lock 具有相同的基本行为和语义为隐式监控锁使用
synchronized 方法和报表访问,但扩展功能。
|
static class |
ReentrantReadWriteLock.ReadLock
|
static class |
ReentrantReadWriteLock.WriteLock
|
Modifier and Type | Method and Description |
---|---|
Lock |
StampedLock.asReadLock()
|
Lock |
StampedLock.asWriteLock()
|
Lock |
ReadWriteLock.readLock()
返回用于读取的锁。
|
Lock |
ReadWriteLock.writeLock()
返回用于写入的锁。
|
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.