java.lang.Object
|
+--org.apache.commons.collections.collection.SynchronizedCollection
|
+--org.apache.commons.collections.buffer.SynchronizedBuffer
|
+--org.apache.commons.collections.buffer.BlockingBuffer
BlockingBuffer(Buffer buffer) Constructor that wraps (not copies). |
boolean | add(Object o) |
boolean | addAll(Collection c) |
static Buffer | Factory method to create a blocking buffer. |
Object | get() |
Object | remove() |
protected BlockingBuffer(Buffer buffer)
- if the buffer is nullpublic boolean add(Object o)
public boolean addAll(Collection c)
public static Buffer decorate(Buffer buffer)
- if buffer is nullpublic Object get()
public Object remove()
Bufferto make get() and remove() block when theBufferis empty. If eithergetorremoveis called on an emptyBuffer, the calling thread waits for notification that an add or addAll operation has completed. When one or more entries are added to an emptyBuffer, all threads blocked ingetorremoveare notified. There is no guarantee that concurrent blockedgetorremoverequests will be "unblocked" and receive data in the order that they arrive.