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 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 path
      dataType - the type of data the session handles
      configuration - the session's configuration properties
      Returns:
      the session
    • executeDataCollection

      CompletionStage<Void> executeDataCollection(CollectionContext context)
      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 all DataNodeSessions, 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.