javax.concurrent |
|
Java Source File Name | Type | Comment |
BoundedBuffer.java | Class | Efficient array-based bounded buffer class.
Adapted from CPJ, chapter 8, which describes design.
[ Introduction to this package. |
BoundedChannel.java | Interface | A channel that is known to have a capacity, signifying
that put operations may block when the
capacity is reached. |
Channel.java | Interface | Main interface for buffers, queues, pipes, conduits, etc.
A Channel represents anything that you can put items
into and take them out of. |
DefaultChannelCapacity.java | Class | A utility class to set the default capacity of
BoundedChannel
implementations that otherwise require a capacity argument
See Also: BoundedChannel See Also: [ Introduction to this package. |
Executor.java | Interface | Interface for objects that execute Runnables,
as well as various objects that can be wrapped
as Runnables.
The main reason to use Executor throughout a program or
subsystem is to provide flexibility: You can easily
change from using thread-per-task to using pools or
queuing, without needing to change most of your code that
generates tasks.
The general intent is that execution be asynchronous,
or at least independent of the caller. |
Latch.java | Class | A latch is a boolean condition that is set at most once, ever.
Once a single release is issued, all acquires will pass.
Sample usage. Here are a set of classes that use
a latch as a start signal for a group of worker threads that
are created and started beforehand, and then later enabled.
class Worker implements Runnable {
private final Latch startSignal;
Worker(Latch l) { startSignal = l; }
public void run() {
startSignal.acquire();
doWork();
}
void doWork() { ... |
Mutex.java | Class | A simple non-reentrant mutual exclusion lock.
The lock is free upon construction. |
Puttable.java | Interface | This interface exists to enable stricter type checking
for channels. |
Sync.java | Interface | Main interface for locks, gates, and conditions.
Sync objects isolate waiting and notification for particular
logical states, resource availability, events, and the like that are
shared across multiple threads. |
SynchronizedInt.java | Class | A class useful for offloading synch for int instance variables.
[ Introduction to this package. |
SynchronizedVariable.java | Class | Base class for simple, small classes
maintaining single values that are always accessed
and updated under synchronization. |
Takable.java | Interface | This interface exists to enable stricter type checking
for channels. |