Kieker 1.11

kieker.analysis.plugin.filter.record
Class RealtimeRecordDelayFilter

java.lang.Object
  extended by kieker.analysis.analysisComponent.AbstractAnalysisComponent
      extended by kieker.analysis.plugin.AbstractPlugin
          extended by kieker.analysis.plugin.filter.AbstractFilterPlugin
              extended by kieker.analysis.plugin.filter.record.RealtimeRecordDelayFilter
All Implemented Interfaces:
IAnalysisComponent, IFilterPlugin, IPlugin

public class RealtimeRecordDelayFilter
extends AbstractFilterPlugin

Forwards incoming IMonitoringRecords with delays computed from the IMonitoringRecord.getLoggingTimestamp() value (assumed to be in the configured resolution). For example, after initialization, if records with logging timestamps 3000 and 4500 nanos are received, the first record is forwarded immediately; the second will be forwarded 1500 nanos later. The acceleration factor can be used to accelerate/slow down the replay (default 1.0, which means no acceleration/slow down).

Since:
1.6
Author:
Andre van Hoorn, Robert von Massow, Jan Waller

Nested Class Summary
 
Nested classes/interfaces inherited from interface kieker.analysis.plugin.IPlugin
IPlugin.PluginInputPortReference, IPlugin.STATE
 
Field Summary
static double CONFIG_PROPERTY_ACCELERATION_FACTOR_DEFAULT
           
static java.lang.String CONFIG_PROPERTY_NAME_ACCELERATION_FACTOR
          Factor to use for accelerating/slowing down the replay.
static java.lang.String CONFIG_PROPERTY_NAME_ADDITIONAL_SHUTDOWN_DELAY_SECONDS
          The number of additional seconds to wait before execute the termination (after all records have been forwarded).
static java.lang.String CONFIG_PROPERTY_NAME_NUM_WORKERS
          The number of threads to be used for the internal ThreadPoolExecutor, processing the scheduled IMonitoringRecords.
static java.lang.String CONFIG_PROPERTY_NAME_TIMER
          The precision of the used timer (MILLISECONDS or NANOSECONDS).
static java.lang.String CONFIG_PROPERTY_NAME_WARN_NEGATIVE_DELAY_SECONDS
          The number of seconds of negative scheduling time that produces a warning.
static java.lang.String INPUT_PORT_NAME_RECORDS
          The name of the input port receiving the records.
static java.lang.String OUTPUT_PORT_NAME_RECORDS
          The name of the output port delivering the delayed records.
 
Fields inherited from class kieker.analysis.analysisComponent.AbstractAnalysisComponent
CONFIG_NAME, configuration, log, LOG, projectContext, recordsTimeUnitFromProjectContext
 
Constructor Summary
RealtimeRecordDelayFilter(Configuration configuration, IProjectContext projectContext)
          Creates a new instance of this class using the given parameters.
 
Method Summary
 Configuration getCurrentConfiguration()
          This method should deliver a Configuration object containing the current configuration of this instance.
 void inputRecord(IMonitoringRecord monitoringRecord)
          This method represents the input port of this filter.
 void terminate(boolean error)
          Initiates a termination of the plugin.
 
Methods inherited from class kieker.analysis.plugin.filter.AbstractFilterPlugin
init
 
Methods inherited from class kieker.analysis.plugin.AbstractPlugin
areAllRepositoryPortsConnected, connect, connect, deliver, getAllDisplayNames, getAllInputPortNames, getAllOutputPortNames, getAllRepositoryPortNames, getConnectedPlugins, getCurrentRepositories, getDefaultConfiguration, getIncomingPlugins, getPluginDescription, getPluginName, getRepository, getState, isConnectionAllowed, notifyNewIncomingConnection, notifyNewOutgoingConnection, shutdown, start
 
Methods inherited from class kieker.analysis.analysisComponent.AbstractAnalysisComponent
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface kieker.analysis.plugin.IPlugin
connect, getAllDisplayNames, getAllInputPortNames, getAllOutputPortNames, getAllRepositoryPortNames, getConnectedPlugins, getCurrentRepositories, getName, getPluginDescription, getPluginName, getState
 

Field Detail

INPUT_PORT_NAME_RECORDS

public static final java.lang.String INPUT_PORT_NAME_RECORDS
The name of the input port receiving the records.

See Also:
Constant Field Values

OUTPUT_PORT_NAME_RECORDS

public static final java.lang.String OUTPUT_PORT_NAME_RECORDS
The name of the output port delivering the delayed records.

See Also:
Constant Field Values

CONFIG_PROPERTY_NAME_NUM_WORKERS

public static final java.lang.String CONFIG_PROPERTY_NAME_NUM_WORKERS
The number of threads to be used for the internal ThreadPoolExecutor, processing the scheduled IMonitoringRecords.

See Also:
Constant Field Values

CONFIG_PROPERTY_NAME_ADDITIONAL_SHUTDOWN_DELAY_SECONDS

public static final java.lang.String CONFIG_PROPERTY_NAME_ADDITIONAL_SHUTDOWN_DELAY_SECONDS
The number of additional seconds to wait before execute the termination (after all records have been forwarded).

See Also:
Constant Field Values

CONFIG_PROPERTY_NAME_WARN_NEGATIVE_DELAY_SECONDS

public static final java.lang.String CONFIG_PROPERTY_NAME_WARN_NEGATIVE_DELAY_SECONDS
The number of seconds of negative scheduling time that produces a warning.

See Also:
Constant Field Values

CONFIG_PROPERTY_NAME_TIMER

public static final java.lang.String CONFIG_PROPERTY_NAME_TIMER
The precision of the used timer (MILLISECONDS or NANOSECONDS).

See Also:
Constant Field Values

CONFIG_PROPERTY_NAME_ACCELERATION_FACTOR

public static final java.lang.String CONFIG_PROPERTY_NAME_ACCELERATION_FACTOR
Factor to use for accelerating/slowing down the replay.

See Also:
Constant Field Values

CONFIG_PROPERTY_ACCELERATION_FACTOR_DEFAULT

public static final double CONFIG_PROPERTY_ACCELERATION_FACTOR_DEFAULT
See Also:
Constant Field Values
Constructor Detail

RealtimeRecordDelayFilter

public RealtimeRecordDelayFilter(Configuration configuration,
                                 IProjectContext projectContext)
Creates a new instance of this class using the given parameters.

Parameters:
configuration - The configuration for this component.
projectContext - The project context for this component.
Method Detail

inputRecord

public final void inputRecord(IMonitoringRecord monitoringRecord)
This method represents the input port of this filter.

Parameters:
monitoringRecord - The next monitoring record.

terminate

public void terminate(boolean error)
Description copied from class: AbstractFilterPlugin
Initiates a termination of the plugin. This method is only used by the framework and should not be called manually. Use the method AnalysisController.terminate(boolean) instead. After receiving this notification, the plugin should terminate any running methods, e.g., read for readers.

Specified by:
terminate in interface IPlugin
Overrides:
terminate in class AbstractFilterPlugin
Parameters:
error - Determines whether the plugin is terminated due to an error or not.

getCurrentConfiguration

public Configuration getCurrentConfiguration()
This method should deliver a Configuration object containing the current configuration of this instance. In other words: The constructor should be able to use the given object to initialize a new instance of this class with the same intern properties.

Specified by:
getCurrentConfiguration in interface IAnalysisComponent
Specified by:
getCurrentConfiguration in interface IPlugin
Specified by:
getCurrentConfiguration in class AbstractAnalysisComponent
Returns:
A completely filled configuration object.

Kieker 1.11

Copyright 2015 Kieker Project, http://kieker-monitoring.net