Class DataCollectorFactory.StreamingDataCollector
java.lang.Object
com.inductiveautomation.historian.gateway.api.storage.realtime.DataCollectorFactory.AbstractDataCollector
com.inductiveautomation.historian.gateway.api.storage.realtime.DataCollectorFactory.StreamingDataCollector
- All Implemented Interfaces:
DataCollector
,Runnable
- Enclosing class:
- DataCollectorFactory
protected class DataCollectorFactory.StreamingDataCollector
extends DataCollectorFactory.AbstractDataCollector
implements Runnable
Base abstract class for data collector implementations that provides common functionality
for both manual and streaming collection modes.
A data collector manages a set of node sessions that produce data points from various sources. It tracks active sessions, handles source changes and retirements, and delegates data collection to the appropriate node sessions based on the collection mode.
The collector coordinates with a SnapshotProcessor
to process collected data points
during collection operations. It maintains thread-safe collections of active sessions and
source changes to ensure data integrity in concurrent environments.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.historian.gateway.api.storage.realtime.DataCollectorFactory.AbstractDataCollector
DataCollectorFactory.AbstractDataCollector.AbstractNodeSession, DataCollectorFactory.AbstractDataCollector.ManualNodeSession, DataCollectorFactory.AbstractDataCollector.StreamingNodeSession
-
Constructor Summary
ConstructorsConstructorDescriptionStreamingDataCollector
(Multikey key, StorageEngine storageEngine, CollectorId collectorId, SnapshotProcessor processor) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
run()
shutdown()
Initiates an orderly shutdown of thisDataCollector
.Methods inherited from class com.inductiveautomation.historian.gateway.api.storage.realtime.DataCollectorFactory.AbstractDataCollector
closeSession, createNodeSession, executeDataCollection, identifier, onSourceChanged
-
Constructor Details
-
StreamingDataCollector
public StreamingDataCollector(Multikey key, StorageEngine storageEngine, CollectorId collectorId, SnapshotProcessor processor)
-
-
Method Details
-
run
public void run() -
collectData
protected void collectData() -
shutdown
Description copied from interface:DataCollector
Initiates 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
DataNodeSession
s - Release any system resources
DataCollector
instance should be considered unusable and any subsequent method calls will result in undefined behavior.- Specified by:
shutdown
in interfaceDataCollector
- Overrides:
shutdown
in classDataCollectorFactory.AbstractDataCollector
- Returns:
- A
CompletionStage
that completes normally when shutdown is finished, or completes exceptionally if errors occurred during shutdown
-