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.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordThe outcome of a fetch: the envelope, the per-key terminal timestamps for cursor advancement, and a closer for STREAMING resources. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()Releases resources the runner holds.default QualifiedValuerun(HistorianQueryBindingConfig config, TimeRangeSpec.Resolved resolvedTimeRange) Runs a fetch with an empty cursor.run(HistorianQueryBindingConfig config, TimeRangeSpec.Resolved resolvedTimeRange, Map<String, Instant> cursorIn) Runs a fetch with a cursor for append-only delta fetches.
-
Method Details
-
run
HistorianQueryRunner.Result run(HistorianQueryBindingConfig config, TimeRangeSpec.Resolved resolvedTimeRange, Map<String, Instant> cursorIn) Runs a fetch with a cursor for append-only delta fetches.Each
appendOnlyentry'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 configresolvedTimeRange- the resolved range for the tickcursorIn- the current cursor map keyed byCursorKey.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 configresolvedTimeRange- the concrete (start, end) resolved fromconfig.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 callrun(HistorianQueryBindingConfig, TimeRangeSpec.Resolved, Map)afterwards. The default does nothing.
-