Package kieker.analysis.generic
Class RealtimeRecordDelayProducer
java.lang.Object
teetime.framework.AbstractStage
teetime.framework.AbstractProducerStage<IMonitoringRecord>
kieker.analysis.generic.RealtimeRecordDelayProducer
public class RealtimeRecordDelayProducer extends teetime.framework.AbstractProducerStage<IMonitoringRecord>
Gets records from a queue, calculates the delay for each records and forwards the records after the delay. As this stage extends
AbstractProducerStage
it
is always declared as active.- Since:
- 1.13
- Author:
- Andre van Hoorn, Robert von Massow, Jan Waller, Lars Bluemke
-
Field Summary
Fields Modifier and Type Field Description static double
ACCELERATION_FACTOR_DEFAULT
-
Constructor Summary
Constructors Constructor Description RealtimeRecordDelayProducer(java.util.concurrent.LinkedBlockingQueue<java.lang.Object> recordQueue, java.lang.Object endToken, java.util.concurrent.TimeUnit timeunit, double accelerationFactor)
Creates a new instance of this class using the given parameters. -
Method Summary
Modifier and Type Method Description protected void
execute()
long
getNegativeDelayWarningBound()
Returns the time bound for which a warning is displayed when the computed delay falls below -(time bound).void
setNegativeDelayWarningBound(long negativeDelay, java.util.concurrent.TimeUnit unit)
Sets the time bound for which a warning is displayed when the computed delay falls below -(time bound).Methods inherited from class teetime.framework.AbstractProducerStage
getOutputPort, getTerminationStrategy
Methods inherited from class teetime.framework.AbstractStage
abort, addInputPortRemovedListener, addOutputPortRemovedListener, compareAndSetBeingExecuted, createInputPort, createInputPort, createInputPort, createInputPort, createOutputPort, createOutputPort, createOutputPort, createOutputPort, declareActive, declarePassive, executeByFramework, getCurrentState, getId, getInputPorts, getOutputPorts, getOwningThread, isActive, isBeingExecuted, isPaused, isProducer, isStateless, onSignal, onStarting, onTerminating, onValidating, removeDynamicPort, removeDynamicPort, setPaused, setStateless, shouldBeTerminated, signalAlreadyReceived, terminateStage, toString, workCompleted
-
Field Details
-
ACCELERATION_FACTOR_DEFAULT
public static final double ACCELERATION_FACTOR_DEFAULT- See Also:
- Constant Field Values
-
-
Constructor Details
-
RealtimeRecordDelayProducer
public RealtimeRecordDelayProducer(java.util.concurrent.LinkedBlockingQueue<java.lang.Object> recordQueue, java.lang.Object endToken, java.util.concurrent.TimeUnit timeunit, double accelerationFactor)Creates a new instance of this class using the given parameters.- Parameters:
recordQueue
- Queue to pass records fromRealtimeRecordDelayConsumer
toRealtimeRecordDelayProducer
.endToken
- Simple Object to indicate that no more records are received and the stage can terminate.timeunit
- The time unit to be used.accelerationFactor
- Determines the replay speed.
-
-
Method Details
-
execute
protected void execute()- Specified by:
execute
in classteetime.framework.AbstractStage
-
getNegativeDelayWarningBound
public long getNegativeDelayWarningBound()Returns the time bound for which a warning is displayed when the computed delay falls below -(time bound).- Returns:
- negativeDelayWarningBound
-
setNegativeDelayWarningBound
public void setNegativeDelayWarningBound(long negativeDelay, java.util.concurrent.TimeUnit unit)Sets the time bound for which a warning is displayed when the computed delay falls below -(time bound).- Parameters:
negativeDelay
- The chosen time bound.unit
- Time unit of the chosen time bound.
-