Interface HistorianQueryRunner


public interface HistorianQueryRunner
Executes one fetch for the historian.query Perspective binding, in process. It supports raw and aggregated data-point entries, annotation and metadata sections, append-only delta cursors, non-DOCUMENT value formats and streaming.

Thread-safe: bindings call it concurrently from polling ticks across many sessions.

  • Method Details

    • run

      Runs a fetch with a cursor for append-only delta fetches.

      Each appendOnly entry's effective time range narrows to (cursorIn[entryKey], resolvedTimeRange.end()]; other entries ignore the cursor. The caller merges the returned terminal timestamps into its cursor state, advancing only those whose section reported Good quality.

      Parameters:
      config - the binding config
      resolvedTimeRange - the resolved range for the tick
      cursorIn - the current cursor map keyed by CursorKey.toString(); empty on the first tick
      Returns:
      the envelope value and the per-key terminal timestamps
    • run

      default QualifiedValue run(HistorianQueryBindingConfig config, TimeRangeSpec.Resolved resolvedTimeRange)
      Runs a fetch with an empty cursor.
      Parameters:
      config - the full binding config
      resolvedTimeRange - the concrete (start, end) resolved from config.timeRange() at this tick; the caller resolves it so the cache key is deterministic
      Returns:
      the sectioned envelope (a JSON string for DOCUMENT format) with the worst-of-section terminal quality
    • close

      default void close()
      Releases resources the runner holds. Called after all in-flight queries complete; do not call run(HistorianQueryBindingConfig, TimeRangeSpec.Resolved, Map) afterwards. The default does nothing.