java.util.concurrent.locks |
Interfaces and classes providing a framework for locking and waiting
for conditions that is distinct from built-in synchronization and
monitors. |
Java Source File Name | Type | Comment |
AbstractOwnableSynchronizer.java | Class | A synchronizer that may be exclusively owned by a thread. |
AbstractQueuedLongSynchronizer.java | Class | A version of
AbstractQueuedSynchronizer in
which synchronization state is maintained as a long.
This class has exactly the same structure, properties, and methods
as AbstractQueuedSynchronizer with the exception
that all state-related parameters and results are defined
as long rather than int. |
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 | |
package-info.java | | |
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 | |