Package nz.org.riskscape.engine.sched
Class AccumulatorSink
java.lang.Object
nz.org.riskscape.engine.sched.AccumulatorSink
- All Implemented Interfaces:
nz.org.riskscape.engine.pipeline.Sink
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface nz.org.riskscape.engine.pipeline.Sink
DEVNULL -
Constructor Summary
ConstructorsConstructorDescriptionAccumulatorSink(List<nz.org.riskscape.engine.pipeline.Collector<?>> collectors) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(nz.org.riskscape.engine.Tuple tuple) booleanvoidfinish()getAndClearAccumulator(nz.org.riskscape.engine.pipeline.Collector forCollector) Returns the accumulator for a given collector.boolean
-
Constructor Details
-
AccumulatorSink
-
-
Method Details
-
accept
public boolean accept(nz.org.riskscape.engine.Tuple tuple) - Specified by:
acceptin interfacenz.org.riskscape.engine.pipeline.Sink
-
getAndClearAccumulator
Returns the accumulator for a given collector. This clears the accumulator for the sink (so that any tuples associated with the accumulator can eventually be garbage collected), so should only be called when the sink is finished.
-
finish
public void finish()- Specified by:
finishin interfacenz.org.riskscape.engine.pipeline.Sink
-
isUnbounded
public boolean isUnbounded()- Specified by:
isUnboundedin interfacenz.org.riskscape.engine.pipeline.Sink
-
canAccept
public boolean canAccept()- Specified by:
canAcceptin interfacenz.org.riskscape.engine.pipeline.Sink
-