org.apache.commons.collections.buffer
Class BlockingBuffer
- Buffer, Collection, Serializable
public class BlockingBuffer
Decorates another
Buffer
to make
get()
and
remove()
block when the
Buffer
is empty.
If either
get
or
remove
is called on an empty
Buffer
, the calling thread waits for notification that
an
add
or
addAll
operation has completed.
When one or more entries are added to an empty
Buffer
,
all threads blocked in
get
or
remove
are notified.
There is no guarantee that concurrent blocked
get
or
remove
requests will be "unblocked" and receive data in the
order that they arrive.
This class is Serializable from Commons Collections 3.1.
$Revision: 1.7 $ $Date: 2004/06/03 22:02:13 $- Stephen Colebourne
- Janek Bogucki
- Phil Steitz
add , addAll , clear , contains , containsAll , decorate , equals , hashCode , isEmpty , iterator , remove , removeAll , retainAll , size , toArray , toArray , toString |
BlockingBuffer
protected BlockingBuffer(Buffer buffer)
Constructor that wraps (not copies).
buffer
- the buffer to decorate, must not be null
Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.