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.
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 ClassesModifier and TypeClassDescriptionprotected classDeprecated.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
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.The name of the property determining the initial delay in nanoseconds.static final StringDeprecated.The name of the property determining the number of impulses to emit.static final StringDeprecated.The name of the property determining the update interval in nanoseconds.static final StringDeprecated.The default value for the initial delay (0 seconds).static final StringDeprecated.The default value for number of impulses (infinite).static final StringDeprecated.The default value for the update interval (1 second).static final longDeprecated.A value for the number of impulses.static final StringDeprecated.The name of the output port for the timestamp records.static final StringDeprecated.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
ConstructorsConstructorDescriptionTimeReader(Configuration configuration, IProjectContext projectContext) Deprecated.Creates a new timer using the given configuration. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.This method should deliver aConfigurationobject containing the current configuration of this instance.booleanread()Deprecated.Starts the reader.protected voidDeprecated.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.reader.AbstractReaderPlugin
initMethods 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 kieker.analysis.analysisComponent.AbstractAnalysisComponent
getNameMethods 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
Deprecated.The name of the output port for the timestamps.- See Also:
-
OUTPUT_PORT_NAME_TIMESTAMP_RECORDS
Deprecated.The name of the output port for the timestamp records.- See Also:
-
CONFIG_PROPERTY_NAME_UPDATE_INTERVAL_NS
Deprecated.The name of the property determining the update interval in nanoseconds.- See Also:
-
CONFIG_PROPERTY_VALUE_UPDATE_INTERVAL_NS
Deprecated.The default value for the update interval (1 second).- See Also:
-
CONFIG_PROPERTY_NAME_DELAY_NS
Deprecated.The name of the property determining the initial delay in nanoseconds.- See Also:
-
CONFIG_PROPERTY_VALUE_DELAY_NS
Deprecated.The default value for the initial delay (0 seconds).- See Also:
-
CONFIG_PROPERTY_NAME_NUMBER_IMPULSES
Deprecated.The name of the property determining the number of impulses to emit.- See Also:
-
CONFIG_PROPERTY_VALUE_NUMBER_IMPULSES
Deprecated.The default value for number of impulses (infinite).- See Also:
-
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:
-
-
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.
-