mirror of
https://github.com/apache/commons-collections.git
synced 2025-02-16 06:56:05 +00:00
Clarified blocking behavior in javadoc.
Submitted by: Janek Bogucki Reviewed/Edited by: Phil Steitz Pr #23234 git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@131162 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9f3a1ecf83
commit
c9aca369b7
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/BlockingBuffer.java,v 1.3 2003/09/18 03:28:28 psteitz Exp $
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/BlockingBuffer.java,v 1.4 2003/09/18 05:09:15 psteitz Exp $
|
||||
* ====================================================================
|
||||
*
|
||||
* The Apache Software License, Version 1.1
|
||||
@ -63,15 +63,27 @@ import org.apache.commons.collections.Buffer;
|
||||
import org.apache.commons.collections.BufferUnderflowException;
|
||||
|
||||
/**
|
||||
* <code>BlockingBuffer</code> decorates another <code>Buffer</code>
|
||||
* to block on calls to the get and remove methods to wait until entries are
|
||||
* added to the buffer.
|
||||
* <code>BlockingBuffer</code> decorates a <code>Buffer</code> to make
|
||||
* {@link #get()} and {@link #remove()} block when the <code>Buffer</code>
|
||||
* is empty.
|
||||
* <p>
|
||||
* If either <code>get</code> or <code>remove</code> is called on an empty
|
||||
* <code>Buffer</code>, the calling thread waits for notification that
|
||||
* an {@link #add} or {@link #addAll} operation has completed.
|
||||
* <p>
|
||||
* When one or more entries are added to an empty <code>Buffer</code>,
|
||||
* all threads blocked in <code>get</code> or <code>remove</code> are notified.
|
||||
* There is no guarantee that concurrent blocked <code>get</code> or
|
||||
* <code>remove</code> requests will be "unblocked" and receive data in the
|
||||
* order that they arrive.
|
||||
*
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
* @version $Revision: 1.3 $ $Date: 2003/09/18 03:28:28 $
|
||||
* @version $Revision: 1.4 $ $Date: 2003/09/18 05:09:15 $
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
* @author Janek Bogucki
|
||||
* @author Phil Steitz
|
||||
*/
|
||||
public class BlockingBuffer extends SynchronizedBuffer {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user