Package kieker.analysis.generic.time
Class AbstractCurrentTimeEventGenerationFilter<T>
java.lang.Object
teetime.framework.AbstractStage
teetime.framework.AbstractConsumerStage<T>
kieker.analysis.generic.time.AbstractCurrentTimeEventGenerationFilter<T>
- Type Parameters:
T- Type parameter for this abstract class concrete implementations may use Long or IMonitoringRecord.
- Direct Known Subclasses:
RecordCurrentTimeEventGenerationFilter,TimestampCurrentTimeEventGenerationFilter
public abstract class AbstractCurrentTimeEventGenerationFilter<T>
extends teetime.framework.AbstractConsumerStage<T>
Generates time events with a given resolution based on the timestamps of
incoming
IMonitoringRecords.
- The first record received immediately leads to a new
TimestampRecordwith the given timestamp. - The timestamp of the first record is stored as
firstTimestampand future events are generated atfirstTimestamp+ i *timerResolution. - Future
IMonitoringRecordmay lead to futureTimestampRecordas follows:- A newly incoming
IMonitoringRecordwith logging timestamp tstamp leads to the new timer events satisfyingfirstTimestamp+ i *timerResolution< tstamp.
- A newly incoming
- Since:
- 1.3
- Author:
- Andre van Hoorn, Lars Bluemke
-
Field Summary
Fields Modifier and Type Field Description protected teetime.framework.OutputPort<TimestampRecord>currentTimeRecordOutputPortThe output port forTimestampRecords.protected teetime.framework.OutputPort<java.lang.Long>currentTimeValueOutputPortThe output port forLongtimestamps.protected longfirstTimestampTimestamp of the record that was received first.protected longmaxTimestampMaximum timestamp received so far.protected longmostRecentEventFiredThe timestamp of the most recent timer event.protected longtimerResolutionThe timer resolution used. -
Constructor Summary
Constructors Constructor Description AbstractCurrentTimeEventGenerationFilter(long timerResolution)Creates an event generator which generates time events with the given resolution in timeunits. -
Method Summary
Modifier and Type Method Description protected abstract voidexecute(T element)This method represents the input port for new records or raw timestamps.teetime.framework.OutputPort<TimestampRecord>getCurrentTimeRecordOutputPort()teetime.framework.OutputPort<java.lang.Long>getCurrentTimeValueOutputPort()Methods inherited from class teetime.framework.AbstractConsumerStage
createInputPort, execute, getInputPortMethods 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, onTerminating, onValidating, removeDynamicPort, removeDynamicPort, setPaused, setStateless, shouldBeTerminated, signalAlreadyReceived, terminateStage, toString, workCompleted
-
Field Details
-
firstTimestamp
protected volatile long firstTimestampTimestamp of the record that was received first. Notice, that this is not necessarily the lowest timestamp. -
maxTimestamp
protected volatile long maxTimestampMaximum timestamp received so far. -
mostRecentEventFired
protected volatile long mostRecentEventFiredThe timestamp of the most recent timer event. -
timerResolution
protected final long timerResolutionThe timer resolution used. -
currentTimeRecordOutputPort
The output port forTimestampRecords. -
currentTimeValueOutputPort
protected final teetime.framework.OutputPort<java.lang.Long> currentTimeValueOutputPortThe output port forLongtimestamps.
-
-
Constructor Details
-
AbstractCurrentTimeEventGenerationFilter
public AbstractCurrentTimeEventGenerationFilter(long timerResolution)Creates an event generator which generates time events with the given resolution in timeunits.- Parameters:
timerResolution- The timer resolution used
-
-
Method Details
-
execute
This method represents the input port for new records or raw timestamps.- Specified by:
executein classteetime.framework.AbstractConsumerStage<T>- Parameters:
element- The incoming record or timestamp.
-
getCurrentTimeRecordOutputPort
-
getCurrentTimeValueOutputPort
public teetime.framework.OutputPort<java.lang.Long> getCurrentTimeValueOutputPort()
-