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
FieldsModifier and TypeFieldDescriptionprotected final teetime.framework.OutputPort<TimestampRecord>The output port forTimestampRecords.protected final teetime.framework.OutputPort<Long>The output port forLongtimestamps.protected longTimestamp of the record that was received first.protected longMaximum timestamp received so far.protected longThe timestamp of the most recent timer event.protected final longThe timer resolution used.Fields inherited from class teetime.framework.AbstractConsumerStage
inputPortFields inherited from class teetime.framework.AbstractStage
logger -
Constructor Summary
ConstructorsConstructorDescriptionAbstractCurrentTimeEventGenerationFilter(long timerResolution) Creates an event generator which generates time events with the given resolution in timeunits. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidThis method represents the input port for new records or raw timestamps.teetime.framework.OutputPort<TimestampRecord>teetime.framework.OutputPort<Long>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
The 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
-