Bounded Buffer

BoundedBuffer is not a standard Java class, but there is a class of that name in DougLea's influential book ConcurrentProgrammingInJava (CPJ), and there are many copies of that class around.

It is basically a threadsafe queue implemented on top of an array.

More generally, it is a FIFO queue with a fixed capacity. It therefore can be empty, full or some state in between. When shared by 2 or more threads, it must be threadsafe.

See also FlowBasedProgramming (FBP), where BoundedBuffers are used for communication between FBP asynchronous components (processes).


EditText of this page (last edited May 27, 2004) or FindPage with title or text search