Class DataCollectorDelegate

java.lang.Object
com.inductiveautomation.historian.gateway.api.storage.realtime.DataCollectorDelegate
All Implemented Interfaces:
DataCollector

public class DataCollectorDelegate extends Object implements DataCollector
Sits between a collection session and its nodes and the tag actor, absorbing lifecycle gaps such as a session created before the profiles load or a provider restarting.

The delegates hold the last metadata and value, so a node added later still registers the latest values.

  • Constructor Details

    • DataCollectorDelegate

      public DataCollectorDelegate(CollectorId collectorId)
  • Method Details

    • createNodeSession

      public DataNodeSession createNodeSession(QualifiedPath source, DataType dataType, PropertySet configuration)
      Description copied from interface: DataCollector
      Creates a session for one data node, for data, metadata and source changes.
      Specified by:
      createNodeSession in interface DataCollector
      Parameters:
      source - the node's source path
      dataType - the type of data the session handles
      configuration - the session's configuration properties
      Returns:
      the session
    • executeDataCollection

      public CompletionStage<Void> executeDataCollection(CollectionContext context)
      Description copied from interface: DataCollector
      Executes a periodic, one-time or heartbeat collection as described by the context.
      Specified by:
      executeDataCollection in interface DataCollector
      Parameters:
      context - the identifiers, source, interval, timestamp and value origin of the collection
      Returns:
      a stage that completes when collection finishes, or exceptionally on error
    • shutdown

      public CompletionStage<Void> shutdown()
      Description copied from interface: DataCollector
      Shuts down in order: stops accepting points and sessions, flushes queued data, closes all DataNodeSessions, and releases resources. The collector is unusable afterwards.
      Specified by:
      shutdown in interface DataCollector
      Returns:
      a stage that completes when shutdown finishes, or exceptionally on error
    • identifier

      public CollectorId identifier()
      Description copied from interface: DataCollector
      Returns the id that distinguishes this collector.
      Specified by:
      identifier in interface DataCollector
    • updateStorageEngine

      public void updateStorageEngine(@Nullable StorageEngine storage)
    • closeNode

      protected void closeNode(QualifiedPath path)
    • reassignNodePath

      protected void reassignNodePath(SourceChangePoint sourceChange)