Interface DataCollector
- All Known Implementing Classes:
DataCollectorDelegate, DataCollectorFactory.AbstractDataCollector, DataCollectorFactory.ManualDataCollector, DataCollectorFactory.StreamingDataCollector, ErroredDataCollector
public interface DataCollector
Collects data for data nodes: creates their sessions, executes collection, and shuts down.
-
Method Summary
Modifier and TypeMethodDescriptioncreateNodeSession(QualifiedPath source, DataType dataType, PropertySet configuration) Creates a session for one data node, for data, metadata and source changes.executeDataCollection(CollectionContext context) Executes a periodic, one-time or heartbeat collection as described by the context.Returns the id that distinguishes this collector.shutdown()Shuts down in order: stops accepting points and sessions, flushes queued data, closes allDataNodeSessions, and releases resources.
-
Method Details
-
createNodeSession
DataNodeSession createNodeSession(QualifiedPath source, DataType dataType, PropertySet configuration) Creates a session for one data node, for data, metadata and source changes.- Parameters:
source- the node's source pathdataType- the type of data the session handlesconfiguration- the session's configuration properties- Returns:
- the session
-
executeDataCollection
Executes a periodic, one-time or heartbeat collection as described by the context.- 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
CompletionStage<Void> shutdown()Shuts down in order: stops accepting points and sessions, flushes queued data, closes allDataNodeSessions, and releases resources. The collector is unusable afterwards.- Returns:
- a stage that completes when shutdown finishes, or exceptionally on error
-
identifier
CollectorId identifier()Returns the id that distinguishes this collector.
-