Interface HistorianManager
public interface HistorianManager
Gateway-wide access to historians: their names and engines, and multi-engine queries.
-
Method Summary
Modifier and TypeMethodDescriptionstatic HistorianManagerget(GatewayContext context) Returns the manager for the gateway context.Returns the names of the available historians.getQueryEngine(String historianName) Returns the query engine of the named historian.getStorageEngine(String historianName) Returns the storage engine of the named historian.default Results<AnnotationPoint> queryAnnotations(AnnotationQueryOptions queryOptions) Queries annotation points.default voidqueryDataPoints(MultiEngineQueryOptions options, ResultWriterOptions writerOptions, RowSink sink) Runs a multi-engine query, writing rows directly to aRowSink.default voidqueryDataPoints(MultiEngineQueryOptions options, ResultWriterOptions writerOptions, StreamingDatasetWriter writer) Runs a multi-engine query, as used by thehistorian.queryPerspective binding.default Results<MetadataPoint> queryMetadata(MetadataQueryOptions queryOptions) Queries metadata points.
-
Method Details
-
getHistorianNames
Collection<String> getHistorianNames()Returns the names of the available historians. -
getStorageEngine
Returns the storage engine of the named historian.- Parameters:
historianName- the historian name; must not be null.- Returns:
- the engine, or empty if the historian has none.
-
getQueryEngine
Returns the query engine of the named historian.- Parameters:
historianName- the historian name; must not be null.- Returns:
- the engine, or empty if the historian has none.
-
queryDataPoints
default void queryDataPoints(MultiEngineQueryOptions options, ResultWriterOptions writerOptions, StreamingDatasetWriter writer) Runs a multi-engine query, as used by thehistorian.queryPerspective binding. The default throwsUnsupportedOperationException.- Parameters:
options- the multi-engine envelope; each entry names an engine and its query options.writerOptions- the output format and object type.writer- receives the merged result.- Throws:
UnsupportedOperationException- if multi-engine queries are unsupported.
-
queryDataPoints
default void queryDataPoints(MultiEngineQueryOptions options, ResultWriterOptions writerOptions, RowSink sink) Runs a multi-engine query, writing rows directly to aRowSink. The default adapts theStreamingDatasetWriteroverload.- Parameters:
options- the multi-engine envelope; each entry names an engine and its query options.writerOptions- the output format and object type.sink- receives the merged result rows.
-
queryAnnotations
Queries annotation points. The default throwsUnsupportedOperationException.- Parameters:
queryOptions- the query options.- Returns:
- the matching points, or an error result.
- Throws:
UnsupportedOperationException- if annotation queries are unsupported.
-
queryMetadata
Queries metadata points. The default throwsUnsupportedOperationException.- Parameters:
queryOptions- the query options.- Returns:
- the matching points, or an error result.
- Throws:
UnsupportedOperationException- if metadata queries are unsupported.
-
get
Returns the manager for the gateway context.- Parameters:
context- the gateway context; must not be null.- Returns:
- the historian manager.
-