Class 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 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
  • Field Details

  • Constructor Details

    • TimeReader

      public TimeReader​(kieker.common.configuration.Configuration configuration, IProjectContext projectContext)
      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 method AnalysisController.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, the IPlugin.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

      public kieker.common.configuration.Configuration getCurrentConfiguration()
      Deprecated.
      Description copied from class: AbstractAnalysisComponent
      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.
    • sendTimestampEvent

      protected void sendTimestampEvent()
      Deprecated.
      Sends the current system time as a new timestamp event.