java.util.concurrent.locks |
|
Java Source File Name | Type | Comment |
AbstractQueuedSynchronizer.java | Class | Provides a framework for implementing blocking locks and related
synchronizers (semaphores, events, etc) that rely on
first-in-first-out (FIFO) wait queues. |
Condition.java | Interface | Condition factors out the Object monitor
methods (
Object.wait wait ,
Object.notify notify and
Object.notifyAll notifyAll ) into distinct objects to
give the effect of having multiple wait-sets per object, by
combining them with the use of arbitrary
Lock implementations.
Where a Lock replaces the use of synchronized methods
and statements, a Condition replaces the use of the Object
monitor methods.
Conditions (also known as condition queues or
condition variables) provide a means for one thread to
suspend execution (to "wait") until notified by another
thread that some state condition may now be true. |
Lock.java | Interface | Lock implementations provide more extensive locking
operations than can be obtained using synchronized methods
and statements. |
LockSupport.java | Class | |
ReadWriteLock.java | Interface | A ReadWriteLock maintains a pair of associated
Lock locks , one for read-only operations and one for writing.
The
ReadWriteLock.readLock read lock may be held simultaneously by
multiple reader threads, so long as there are no writers. |
ReentrantLock.java | Class | A reentrant mutual exclusion
Lock with the same basic
behavior and semantics as the implicit monitor lock accessed using
synchronized methods and statements, but with extended
capabilities.
A ReentrantLock is owned by the thread last
successfully locking, but not yet unlocking it. |
ReentrantReadWriteLock.java | Class | An implementation of
ReadWriteLock supporting similar
semantics to
ReentrantLock .
This class has the following properties:
|