public class SynchBufSingleProd<E>
extends java.lang.Object
put(Object)
method to insert an
item, and the consumer uses the get()
method
to extract an item. The transfer of an item from producer to
consumer using these operations is a completely synchronized distributed
assignment, i.e. it's a rendezvous with a data exchange:
the exchange is perfomed only when both partners
are available, and each partner's transfer operation completes only
after the exchange itself is completed.Constructor and Description |
---|
SynchBufSingleProd()
Constructs a new synchronized buffer.
|
Modifier and Type | Method and Description |
---|---|
E |
get()
Consumer side of a synchronized distributed exchange via this buffer.
|
void |
put(E item)
Producer side of a synchronized distributed exchange via this buffer.
|
public SynchBufSingleProd()
public void put(E item) throws java.lang.InterruptedException
java.lang.InterruptedException
public final E get() throws java.lang.InterruptedException
java.lang.InterruptedException