commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/decorators BlockingBuffer.java
Date Thu, 18 Sep 2003 05:09:15 GMT
psteitz     2003/09/17 22:09:15

  Modified:    collections/src/java/org/apache/commons/collections/decorators
                        BlockingBuffer.java
  Log:
  Clarified blocking behavior in javadoc.
  Submitted by: Janek Bogucki
  Reviewed/Edited by: Phil Steitz
  Pr #23234
  
  Revision  Changes    Path
  1.4       +17 -5     jakarta-commons/collections/src/java/org/apache/commons/collections/decorators/BlockingBuffer.java
  
  Index: BlockingBuffer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/decorators/BlockingBuffer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BlockingBuffer.java	18 Sep 2003 03:28:28 -0000	1.3
  +++ BlockingBuffer.java	18 Sep 2003 05:09:15 -0000	1.4
  @@ -63,15 +63,27 @@
   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$ $Date$
    * 
    * @author Stephen Colebourne
    * @author Janek Bogucki
  + * @author Phil Steitz
    */
   public class BlockingBuffer extends SynchronizedBuffer {
       
  
  
  

Mime
View raw message