Record Class ErroredDataCollector

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

public record ErroredDataCollector(CollectorId identifier, QualityCode code) extends Record implements DataCollector
  • Constructor Details

    • ErroredDataCollector

      public ErroredDataCollector(CollectorId identifier, QualityCode code)
      Creates an instance of a ErroredDataCollector record class.
      Parameters:
      identifier - the value for the identifier record component
      code - the value for the code record component
  • Method Details

    • createNodeSession

      public DataNodeSession createNodeSession(QualifiedPath source, DataType dataType, PropertySet configuration)
      Description copied from interface: DataCollector
      Creates a new session for interacting with a data node. This session allows processing various operations like data changes, metadata updates, and source changes for the specified node. It provides a dedicated context for managing the lifecycle and state of a data node.
      Specified by:
      createNodeSession in interface DataCollector
      Parameters:
      source - The QualifiedPath representing the source of the data node.
      dataType - The DataType specifying the type of data handled by the session.
      configuration - A PropertySet containing the configuration properties for the session.
      Returns:
      A DataNodeSession instance for managing operations and observing state changes for the specified data node.
    • executeDataCollection

      public CompletionStage<Void> executeDataCollection(CollectionContext context)
      Description copied from interface: DataCollector
      Executes the data collection process using the provided context. This operation initiates data retrieval or aggregation based on the configuration and parameters specified in the CollectionContext instance. The process could include handling periodic or one-time data collections, as well as processing heartbeat operations if indicated in the context.
      Specified by:
      executeDataCollection in interface DataCollector
      Parameters:
      context - The CollectionContext object encapsulating all necessary details for the data collection operation, such as identifiers, source, interval, timestamp, and value origin.
      Returns:
      A CompletionStage that completes when the data collection process is finished. If any errors occur during the operation, the CompletionStage will complete exceptionally.
    • shutdown

      public CompletionStage<Void> shutdown()
      Description copied from interface: DataCollector
      Initiates an orderly shutdown of this DataCollector. This operation will:
      1. Stop accepting new data points or node sessions
      2. Process and flush any remaining queued data
      3. Close all active DataNodeSessions
      4. Release any system resources
      After calling this method, the DataCollector instance should be considered unusable and any subsequent method calls will result in undefined behavior.
      Specified by:
      shutdown in interface DataCollector
      Returns:
      A CompletionStage that completes normally when shutdown is finished, or completes exceptionally if errors occurred during shutdown
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • identifier

      public CollectorId identifier()
      Returns the value of the identifier record component.
      Specified by:
      identifier in interface DataCollector
      Returns:
      the value of the identifier record component
    • code

      public QualityCode code()
      Returns the value of the code record component.
      Returns:
      the value of the code record component