Class AbstractStringRegistryReaderPlugin

All Implemented Interfaces:
IAnalysisComponent, IPlugin, IReaderPlugin
Direct Known Subclasses:
AmqpReader

@Deprecated
public abstract class AbstractStringRegistryReaderPlugin
extends AbstractReaderPlugin
Deprecated.
since 1.15.1 old plugin api
This class should be used as the abstract super class for all readers which make use of string registries to reduce the amount of transferred data. It provides the necessary infrastructure to handle multiple concurrent registries for multiple clients and other convenience methods.
Since:
1.13
Author:
Holger Knoche
  • Constructor Details

    • AbstractStringRegistryReaderPlugin

      public AbstractStringRegistryReaderPlugin​(Configuration configuration, IProjectContext projectContext)
      Deprecated.
      Each Plugin requires a constructor with a Configuration object and a IProjectContext.
      Parameters:
      configuration - The configuration for this component.
      projectContext - The project context for this component. The component will be registered.
    • AbstractStringRegistryReaderPlugin

      protected AbstractStringRegistryReaderPlugin​(Configuration configuration, IProjectContext projectContext, java.lang.String cacheDurationProperty, java.util.concurrent.TimeUnit cacheDurationTimeUnit)
      Deprecated.
      Constructor which allows to specify a configuration property which contains the cache duration in the given time unit. Since defaults are populated by the super constructor, the access to the configuration property needs to be deferred until after the super constructor invocation.
      Parameters:
      configuration - The configuration for this component.
      projectContext - The project context for this component. The component will be registered.
      cacheDurationProperty - The name of the configuration property containing the cache duration
      cacheDurationTimeUnit - The time unit for the cache duration
  • Method Details

    • init

      public boolean init()
      Deprecated.
      Description copied from class: AbstractReaderPlugin
      Initiates the start of a component. This method is called once when a AnalysisController's run() method is called. This implementation must not be blocking! Asynchronous consumers would spawn (an) asynchronous thread(s) in this method.
      Specified by:
      init in interface IPlugin
      Overrides:
      init in class AbstractReaderPlugin
      Returns:
      true on success; false otherwise.
    • createCache

      protected StringRegistryCache createCache​(long expirationDuration, java.util.concurrent.TimeUnit expirationTimeUnit)
      Deprecated.
      Creates the cache to be used for storing string registries. This method can be overriden to use a particular cache implementation.
      Parameters:
      expirationDuration - The duration until a cache entry expires
      expirationTimeUnit - The time unit for the cache expiration
      Returns:
      An appropriate cache instance
    • ensureThreadsStarted

      protected final void ensureThreadsStarted()
      Deprecated.
      Ensures that the required threads are started. This method should be called before registering a record.
    • handleRegistryRecord

      protected void handleRegistryRecord​(java.nio.ByteBuffer buffer)
      Deprecated.
      Handles the given raw data for a registry record.
      Parameters:
      buffer - Byte buffer containing the raw data for the record
    • handleRegularRecord

      protected void handleRegularRecord​(java.nio.ByteBuffer buffer)
      Deprecated.
      Handles the given raw data for a regular record.
      Parameters:
      buffer - Byte buffer containing the raw data for the record
    • deliverRecord

      protected abstract void deliverRecord​(IMonitoringRecord monitoringRecord)
      Deprecated.
      Delivers the given record to the appropriate output port(s).
      Parameters:
      monitoringRecord - The monitoring record to deliver