Commit 0a5b65a1 authored by Sören Henning's avatar Sören Henning

first draft of RecordDistributor

parent f9aa9002
package anomalydetection.kieker;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import teetime.framework.AbstractConsumerStage;
import teetime.framework.OutputPort;
public class RecordDistributor extends AbstractConsumerStage<MonitoringRecord> {
private final Map<RecordFilter, OutputPort<MonitoringRecord>> outputPorts = new HashMap<>();
@Override
protected void execute(final MonitoringRecord record) {
for (Entry<RecordFilter, OutputPort<MonitoringRecord>> entry : outputPorts.entrySet()) {
if (entry.getKey().test(record)) {
entry.getValue().send(record);
}
}
}
}
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