|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.fortytwo.flow.SynchronizedSink<T>
T - the type of data being passedpublic class SynchronizedSink<T>
A pipeline which enforces one data item at a time, regardless of the number of threads writing into the sink. It is thread-safe but protects downstream components which may not be thread-safe.
| Constructor Summary | |
|---|---|
SynchronizedSink(Sink<T> other)
Constructs a new synchronized sink using an internal mutex |
|
SynchronizedSink(Sink<T> other,
Object mutex)
Constructs a new synchronized sink using a specified mutex |
|
| Method Summary | |
|---|---|
Object |
getMutex()
|
void |
put(T t)
Passes a data item into the Sink |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SynchronizedSink(Sink<T> other,
Object mutex)
other - the downstream sink which is to be protectedmutex - a mutex to use for synchronizationpublic SynchronizedSink(Sink<T> other)
other - the downstream sink which is to be protected| Method Detail |
|---|
public void put(T t)
throws RippleException
SinkSink
put in interface Sink<T>t - the data item being passed
RippleException - if a data handling error occorspublic Object getMutex()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||