app.util
Class SynchBufMultiProd<E>

java.lang.Object
  extended by app.util.SynchBufSingleProd<E>
      extended by app.util.SynchBufMultiProd<E>

public final class SynchBufMultiProd<E>
extends SynchBufSingleProd<E>

A synchronized buffer with a generic buffered item type, for the use of one or more producer threads and a single consumer thread. This differs from its superclass SynchBufSingleProd only in the extra synchronization it applies to the put(Object) method in order to impose mutual exclusion on the producer threads' access to the buffer.


Constructor Summary
SynchBufMultiProd()
          Constructs a new multi-producer synchronized buffer.
 
Method Summary
 void put(E item)
          Producer side of a synchronized distributed exchange via this buffer.
 
Methods inherited from class app.util.SynchBufSingleProd
get
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynchBufMultiProd

public SynchBufMultiProd()
Constructs a new multi-producer synchronized buffer.

Method Detail

put

public final void put(E item)
               throws java.lang.InterruptedException
Producer side of a synchronized distributed exchange via this buffer.

Overrides:
put in class SynchBufSingleProd<E>
Throws:
java.lang.InterruptedException