use of kieker.common.record.flow.IFlowRecord in project iobserve-analysis by research-iobserve.
the class AnalysisConfiguration method traceProcessing.
/**
* Create trace related filter chains.
*
* @param configuration
* filter configurations
* @throws ConfigurationException
* when configuration fails
*/
private void traceProcessing(final kieker.common.configuration.Configuration configuration) throws ConfigurationException {
if (configuration.getBooleanProperty(ConfigurationKeys.TRACES, false)) {
final TraceReconstructionCompositeStage traceReconstructionStage = new TraceReconstructionCompositeStage(configuration);
OutputPort<EventBasedTrace> behaviorClusteringEventBasedTracePort = traceReconstructionStage.getTraceValidOutputPort();
OutputPort<EventBasedTrace> dataFlowEventBasedTracePort = traceReconstructionStage.getTraceValidOutputPort();
/**
* Connect ports.
*/
final IEventMatcher<IFlowRecord> flowRecordMatcher = new ImplementsEventMatcher<>(IFlowRecord.class, null);
this.eventDispatcher.registerOutput(flowRecordMatcher);
this.connectPorts(flowRecordMatcher.getOutputPort(), traceReconstructionStage.getInputPort());
/**
* Include distributor to support tow simultaneous sinks.
*/
if (configuration.getBooleanProperty(ConfigurationKeys.DATA_FLOW, false) && !configuration.getStringProperty(ConfigurationKeys.BEHAVIOR_CLUSTERING).isEmpty()) {
final IDistributorStrategy strategy = new CopyByReferenceStrategy();
final Distributor<EventBasedTrace> distributor = new Distributor<>(strategy);
this.connectPorts(traceReconstructionStage.getTraceValidOutputPort(), distributor.getInputPort());
behaviorClusteringEventBasedTracePort = distributor.getNewOutputPort();
dataFlowEventBasedTracePort = distributor.getNewOutputPort();
}
/**
* Initialize depending features.
*/
this.behaviorClustering(configuration, behaviorClusteringEventBasedTracePort);
this.dataflow(configuration, dataFlowEventBasedTracePort);
}
}
Aggregations