Class DataCollectorDelegate
java.lang.Object
com.inductiveautomation.historian.gateway.api.storage.realtime.DataCollectorDelegate
- All Implemented Interfaces:
DataCollector
This sits in between our real collection session and nodes, and the tag actor. It helps us
navigate lifecycle issues, such as when the session is created before the profiles are loaded, or
when providers are restarted.
The delegates will hold the last metadata and value, so that if the real node is added later, the latest values can be registered.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcloseNode(QualifiedPath path) createNodeSession(QualifiedPath source, DataType dataType, PropertySet configuration) Creates a new session for interacting with a data node.executeDataCollection(CollectionContext context) Executes the data collection process using the provided context.Retrieves the unique identifier for this data collector.protected voidreassignNodePath(SourceChangePoint sourceChange) shutdown()Initiates an orderly shutdown of thisDataCollector.voidupdateStorageEngine(@Nullable StorageEngine storage)
-
Constructor Details
-
DataCollectorDelegate
-
-
Method Details
-
createNodeSession
public DataNodeSession createNodeSession(QualifiedPath source, DataType dataType, PropertySet configuration) Description copied from interface:DataCollectorCreates 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:
createNodeSessionin interfaceDataCollector- Parameters:
source- TheQualifiedPathrepresenting the source of the data node.dataType- TheDataTypespecifying the type of data handled by the session.configuration- APropertySetcontaining the configuration properties for the session.- Returns:
- A
DataNodeSessioninstance for managing operations and observing state changes for the specified data node.
-
executeDataCollection
Description copied from interface:DataCollectorExecutes the data collection process using the provided context. This operation initiates data retrieval or aggregation based on the configuration and parameters specified in theCollectionContextinstance. The process could include handling periodic or one-time data collections, as well as processing heartbeat operations if indicated in the context.- Specified by:
executeDataCollectionin interfaceDataCollector- Parameters:
context- TheCollectionContextobject encapsulating all necessary details for the data collection operation, such as identifiers, source, interval, timestamp, and value origin.- Returns:
- A
CompletionStagethat completes when the data collection process is finished. If any errors occur during the operation, theCompletionStagewill complete exceptionally.
-
shutdown
Description copied from interface:DataCollectorInitiates an orderly shutdown of thisDataCollector. This operation will:- Stop accepting new data points or node sessions
- Process and flush any remaining queued data
- Close all active
DataNodeSessions - Release any system resources
DataCollectorinstance should be considered unusable and any subsequent method calls will result in undefined behavior.- Specified by:
shutdownin interfaceDataCollector- Returns:
- A
CompletionStagethat completes normally when shutdown is finished, or completes exceptionally if errors occurred during shutdown
-
identifier
Description copied from interface:DataCollectorRetrieves the unique identifier for this data collector. The identifier is used to distinguish between different data collectors and is essential for managing and referencing the collector in various operations.- Specified by:
identifierin interfaceDataCollector- Returns:
- The
CollectorIdrepresenting the unique identifier of this data collector.
-
updateStorageEngine
-
closeNode
-
reassignNodePath
-