Class TimeReader
java.lang.Object
kieker.analysis.analysisComponent.AbstractAnalysisComponent
kieker.analysis.plugin.AbstractPlugin
kieker.analysis.plugin.reader.AbstractReaderPlugin
kieker.analysis.plugin.reader.timer.TimeReader
- All Implemented Interfaces:
IAnalysisComponent,IPlugin,IReaderPlugin
@Deprecated public final class TimeReader extends AbstractReaderPlugin
Deprecated.
since 1.15.1 old plugin api
This plugin provides the current (system) time in regular intervals. The time is delivered to the two output ports as both a timestamp and a
The reader can be configured to emit an arbitrary amount of signals. It can also be configured to emit an infinite amount of signals.
The sent timestamps are created using
TimestampRecord instance.The reader can be configured to emit an arbitrary amount of signals. It can also be configured to emit an infinite amount of signals.
The sent timestamps are created using
System.nanoTime() as a time source, which is being converted to the global time unit (as defined in the
configuration from the given IProjectContext).- Since:
- 1.8
- Author:
- Nils Christian Ehmke
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classTimeReader.TimestampEventTaskDeprecated.A simple helper class used to send the current system time.Nested classes/interfaces inherited from interface kieker.analysis.plugin.IPlugin
IPlugin.PluginInputPortReference, IPlugin.STATE -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONFIG_PROPERTY_NAME_DELAY_NSDeprecated.The name of the property determining the initial delay in nanoseconds.static java.lang.StringCONFIG_PROPERTY_NAME_NUMBER_IMPULSESDeprecated.The name of the property determining the number of impulses to emit.static java.lang.StringCONFIG_PROPERTY_NAME_UPDATE_INTERVAL_NSDeprecated.The name of the property determining the update interval in nanoseconds.static java.lang.StringCONFIG_PROPERTY_VALUE_DELAY_NSDeprecated.The default value for the initial delay (0 seconds).static java.lang.StringCONFIG_PROPERTY_VALUE_NUMBER_IMPULSESDeprecated.The default value for number of impulses (infinite).static java.lang.StringCONFIG_PROPERTY_VALUE_UPDATE_INTERVAL_NSDeprecated.The default value for the update interval (1 second).static longINFINITE_EMITSDeprecated.A value for the number of impulses.static java.lang.StringOUTPUT_PORT_NAME_TIMESTAMP_RECORDSDeprecated.The name of the output port for the timestamp records.static java.lang.StringOUTPUT_PORT_NAME_TIMESTAMPSDeprecated.The name of the output port for the timestamps.Fields inherited from class kieker.analysis.analysisComponent.AbstractAnalysisComponent
CONFIG_NAME, configuration, logger, projectContext, recordsTimeUnitFromProjectContext -
Constructor Summary
Constructors Constructor Description TimeReader(Configuration configuration, IProjectContext projectContext)Deprecated.Creates a new timer using the given configuration. -
Method Summary
Modifier and Type Method Description ConfigurationgetCurrentConfiguration()Deprecated.This method should deliver aConfigurationobject containing the current configuration of this instance.booleanread()Deprecated.Starts the reader.protected voidsendTimestampEvent()Deprecated.Sends the current system time as a new timestamp event.voidterminate(boolean error)Deprecated.Initiates a termination of the plugin.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, startMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface kieker.analysis.plugin.IPlugin
connect, getAllDisplayNames, getAllInputPortNames, getAllOutputPortNames, getAllRepositoryPortNames, getConnectedPlugins, getCurrentRepositories, getName, getPluginDescription, getPluginName, getState
-
Field Details
-
OUTPUT_PORT_NAME_TIMESTAMPS
public static final java.lang.String OUTPUT_PORT_NAME_TIMESTAMPSDeprecated.The name of the output port for the timestamps.- See Also:
- Constant Field Values
-
OUTPUT_PORT_NAME_TIMESTAMP_RECORDS
public static final java.lang.String OUTPUT_PORT_NAME_TIMESTAMP_RECORDSDeprecated.The name of the output port for the timestamp records.- See Also:
- Constant Field Values
-
CONFIG_PROPERTY_NAME_UPDATE_INTERVAL_NS
public static final java.lang.String CONFIG_PROPERTY_NAME_UPDATE_INTERVAL_NSDeprecated.The name of the property determining the update interval in nanoseconds.- See Also:
- Constant Field Values
-
CONFIG_PROPERTY_VALUE_UPDATE_INTERVAL_NS
public static final java.lang.String CONFIG_PROPERTY_VALUE_UPDATE_INTERVAL_NSDeprecated.The default value for the update interval (1 second).- See Also:
- Constant Field Values
-
CONFIG_PROPERTY_NAME_DELAY_NS
public static final java.lang.String CONFIG_PROPERTY_NAME_DELAY_NSDeprecated.The name of the property determining the initial delay in nanoseconds.- See Also:
- Constant Field Values
-
CONFIG_PROPERTY_VALUE_DELAY_NS
public static final java.lang.String CONFIG_PROPERTY_VALUE_DELAY_NSDeprecated.The default value for the initial delay (0 seconds).- See Also:
- Constant Field Values
-
CONFIG_PROPERTY_NAME_NUMBER_IMPULSES
public static final java.lang.String CONFIG_PROPERTY_NAME_NUMBER_IMPULSESDeprecated.The name of the property determining the number of impulses to emit.- See Also:
- Constant Field Values
-
CONFIG_PROPERTY_VALUE_NUMBER_IMPULSES
public static final java.lang.String CONFIG_PROPERTY_VALUE_NUMBER_IMPULSESDeprecated.The default value for number of impulses (infinite).- See Also:
- Constant Field Values
-
INFINITE_EMITS
public static final long INFINITE_EMITSDeprecated.A value for the number of impulses. It makes sure that the reader emits an infinite amount of signals.- See Also:
- Constant Field Values
-
-
Constructor Details
-
TimeReader
Deprecated.Creates a new timer using the given configuration.- Parameters:
configuration- The configuration containing the properties to initialize this timer.projectContext- The project context.
-
-
Method Details
-
terminate
public void terminate(boolean error)Deprecated.Initiates a termination of the plugin. This method is only used by the framework and should not be called manually. Use the methodAnalysisController.terminate(boolean)instead. After receiving this notification, the plugin should terminate any running methods, e.g., read for readers.- Parameters:
error- Determines whether the plugin is terminated due to an error or not.
-
read
public boolean read()Deprecated.Starts the reader. This method is intended to be a blocking operation, i.e., it is assumed that reading has finished before this method returns. The method should indicate an error by the return value false. In asynchronous scenarios, theIPlugin.terminate(boolean)method can be used to initiate the termination of this method.- Returns:
- true if reading was successful; false if an error occurred
-
getCurrentConfiguration
Deprecated.Description copied from class:AbstractAnalysisComponentThis method should deliver aConfigurationobject 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:
getCurrentConfigurationin interfaceIAnalysisComponent- Specified by:
getCurrentConfigurationin interfaceIPlugin- Specified by:
getCurrentConfigurationin classAbstractAnalysisComponent- Returns:
- A completely filled configuration object.
-
sendTimestampEvent
protected void sendTimestampEvent()Deprecated.Sends the current system time as a new timestamp event.
-