|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectapp.util.SynchBufSingleProd<E>
public class SynchBufSingleProd<E>
A synchronized buffer with a generic buffered item type,
for the use of a single producer thread and a single consumer thread.
The producer uses the 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 Summary | |
---|---|
SynchBufSingleProd()
Constructs a new synchronized buffer. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SynchBufSingleProd()
Method Detail |
---|
public void put(E item) throws java.lang.InterruptedException
java.lang.InterruptedException
public final E get() throws java.lang.InterruptedException
java.lang.InterruptedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |