BoundedBuffer
Last edit May 27, 2004
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.
http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/BoundedBuffer.html
http://www.google.com/search?q=BoundedBuffer
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
BoundedBuffer
s are used for communication between FBP asynchronous components (processes).
CategoryJava