T
- Generic type of incoming records. Subclasses use concrete types.public abstract class AbstractTimestampFilter<T>
extends teetime.framework.AbstractConsumerStage<T>
TraceMetadataTimestampFilter
, OperationExecutionRecordTimestampFilter
or MonitioringRecordTimestampFilter
.Modifier and Type | Field and Description |
---|---|
protected teetime.framework.OutputPort<T> |
recordOutsideTimePeriodOutputPort |
protected teetime.framework.OutputPort<T> |
recordWithinTimePeriodOutputPort |
Constructor and Description |
---|
AbstractTimestampFilter(long ignoreBeforeTimestamp,
long ignoreAfterTimestamp)
Creates a new instance of this class using the given parameters.
|
Modifier and Type | Method and Description |
---|---|
protected void |
execute(T record) |
teetime.framework.OutputPort<T> |
getRecordOutsideTimePeriodOutputPort() |
protected abstract long |
getRecordSpecificTimestamp(T record)
Returns the most accurate timestamp available for each record.
|
teetime.framework.OutputPort<T> |
getRecordWithinTimePeriodOutputPort() |
protected boolean |
inRange(long timestamp)
A simple helper method which checks whether the given timestamp is in the configured limits.
|
createInputPort, execute, getInputPort
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, onTerminating, onValidating, removeDynamicPort, removeDynamicPort, setPaused, setStateless, shouldBeTerminated, signalAlreadyReceived, terminateStage, toString, workCompleted
protected final teetime.framework.OutputPort<T> recordWithinTimePeriodOutputPort
protected final teetime.framework.OutputPort<T> recordOutsideTimePeriodOutputPort
public AbstractTimestampFilter(long ignoreBeforeTimestamp, long ignoreAfterTimestamp)
ignoreBeforeTimestamp
- The lower limit for the time stamps of the records.ignoreAfterTimestamp
- The upper limit for the time stamps of the records.protected final boolean inRange(long timestamp)
timestamp
- The timestamp to be checked.protected void execute(T record)
execute
in class teetime.framework.AbstractConsumerStage<T>
protected abstract long getRecordSpecificTimestamp(T record)
record
- An EventRecord, OperationExecutionRecord, TraceMetadata or MonitoringRecord for example.public teetime.framework.OutputPort<T> getRecordWithinTimePeriodOutputPort()
public teetime.framework.OutputPort<T> getRecordOutsideTimePeriodOutputPort()
Copyright 2021 Kieker Project, http://kieker-monitoring.net