|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Pump
A Pump
synchronizes the flow between any number of
paired DataSources
and DataSinks
.
Points are drawn from each source at the same rate.
Points are pumped into each sink as they are drawn.
DataSink
,
DataSource
Constructor Summary | |
Pump()
Sole constructor. |
Method Summary | |
void |
addPair(DataSource dsrc,
DataSink dsnk)
Add a new paired source/sink. |
int |
max()
Determines the larges expected value from all data sources. |
boolean |
pump()
Synchronously move the next point from each source to its associated sink. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Pump()
Method Detail |
public void addPair(DataSource dsrc, DataSink dsnk)
dsrc
- the data source which should be drained in lock step with all the others.dsnk
- the data sink to which points drained from dsrc
are delivered.public int max()
public boolean pump()
true
if all sources are empty. Otherwise false
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |