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
IMonitoringRecord
s.
- The first record received immediately leads to a new
TimestampRecord
with the given timestamp. - The timestamp of the first record is stored as
firstTimestamp
and future events are generated atfirstTimestamp
+ i *timerResolution
. - Future
IMonitoringRecord
may lead to futureTimestampRecord
as follows:- A newly incoming
IMonitoringRecord
with 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>
currentTimeRecordOutputPort
The output port forTimestampRecord
s.protected teetime.framework.OutputPort<java.lang.Long>
currentTimeValueOutputPort
The output port forLong
timestamps.protected long
firstTimestamp
Timestamp of the record that was received first.protected long
maxTimestamp
Maximum timestamp received so far.protected long
mostRecentEventFired
The timestamp of the most recent timer event.protected long
timerResolution
The 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 void
execute(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, 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, 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 forTimestampRecord
s. -
currentTimeValueOutputPort
protected final teetime.framework.OutputPort<java.lang.Long> currentTimeValueOutputPortThe output port forLong
timestamps.
-
-
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:
execute
in classteetime.framework.AbstractConsumerStage<T>
- Parameters:
element
- The incoming record or timestamp.
-
getCurrentTimeRecordOutputPort
-
getCurrentTimeValueOutputPort
public teetime.framework.OutputPort<java.lang.Long> getCurrentTimeValueOutputPort()
-