Class InvalidEventRecordTraceCounter

java.lang.Object
teetime.framework.AbstractStage
teetime.framework.AbstractConsumerStage<TraceEventRecords>
kieker.analysis.architecture.trace.InvalidEventRecordTraceCounter

public class InvalidEventRecordTraceCounter extends teetime.framework.AbstractConsumerStage<TraceEventRecords>
This sink counts and reports the number of incoming invalid TraceEventRecords.
Since:
1.15
Author:
Andre van Hoorn, Reiner Jung -- ported to teetime
  • Field Summary

    Fields inherited from class teetime.framework.AbstractConsumerStage

    inputPort

    Fields inherited from class teetime.framework.AbstractStage

    logger
  • Constructor Summary

    Constructors
    Constructor
    Description
    InvalidEventRecordTraceCounter(boolean logInvalidTraces)
    Creates a new instance of this class using the given parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    execute(TraceEventRecords invalidTrace)
     
    final int
    Delivers the number of traces which have not been processed successfully.
    final long
    Delivers the ID of the last trace which has not been processed successfully.
    final int
    Delivers the total number of traces which have been processed.
    protected void
     
    protected final void
    reportError(long traceId)
    This method can be used to report a trace which has not been processed successfully.

    Methods inherited from class teetime.framework.AbstractConsumerStage

    createInputPort, execute, getInputPort

    Methods inherited from class teetime.framework.AbstractStage

    abort, addInputPortRemovedListener, addOutputPortRemovedListener, compareAndSetBeingExecuted, createInputPort, createInputPort, createInputPort, createOutputPort, createOutputPort, createOutputPort, createOutputPort, declareActive, declarePassive, executeByFramework, getCurrentState, getId, getInputPorts, getOutputPorts, getOwningThread, getTerminationStrategy, isActive, isBeingExecuted, isPaused, isProducer, isStateless, onSignal, onStarting, onValidating, removeDynamicPort, removeDynamicPort, setPaused, setStateless, shouldBeTerminated, signalAlreadyReceived, terminateStage, toString, workCompleted

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • InvalidEventRecordTraceCounter

      public InvalidEventRecordTraceCounter(boolean logInvalidTraces)
      Creates a new instance of this class using the given parameters.
      Parameters:
      logInvalidTraces - if true invalid traces are logged in the error log
  • Method Details

    • execute

      protected void execute(TraceEventRecords invalidTrace) throws Exception
      Specified by:
      execute in class teetime.framework.AbstractConsumerStage<TraceEventRecords>
      Throws:
      Exception
    • onTerminating

      protected void onTerminating()
      Overrides:
      onTerminating in class teetime.framework.AbstractStage
    • reportError

      protected final void reportError(long traceId)
      This method can be used to report a trace which has not been processed successfully.
      Parameters:
      traceId - The ID of the processed trace.
    • getErrorCount

      public final int getErrorCount()
      Delivers the number of traces which have not been processed successfully.
      Returns:
      The number of traces.
    • getTotalCount

      public final int getTotalCount()
      Delivers the total number of traces which have been processed.
      Returns:
      The number of traces.
    • getLastTraceIdError

      public final long getLastTraceIdError()
      Delivers the ID of the last trace which has not been processed successfully.
      Returns:
      The trace ID.