Commit 25a007a1 authored by Christian Wulf's avatar Christian Wulf

added MultiStageDistributor and MultiStageMerger as preparation for the

dynamic task farm stage
parent e2617738
package teetime.stage.basic.distributor.dynamic;
import teetime.util.framework.port.PortAction;
public class MultiStageDistributor<T> extends DynamicDistributor<T> {
@Override
public void onTerminating() throws Exception {
// foreach on portActions is not implemented, so we iterate by ourselves
PortAction<DynamicDistributor<T>> portAction = portActions.poll();
while (portAction != null) {
portAction.execute(this);
portAction = portActions.poll();
}
super.onTerminating();
}
}
package teetime.stage.basic.merger.dynamic;
import teetime.stage.basic.merger.strategy.IMergerStrategy;
import teetime.util.framework.port.PortAction;
public class MultiStageMerger<T> extends DynamicMerger<T> {
public MultiStageMerger(final IMergerStrategy strategy) {
super(strategy);
}
@Override
public void onTerminating() throws Exception {
// foreach on portActions is not implemented, so we iterate by ourselves
PortAction<DynamicMerger<T>> portAction = portActions.poll();
while (portAction != null) {
portAction.execute(this);
portAction = portActions.poll();
}
super.onTerminating();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment