Class HistorianManagerImpl
java.lang.Object
com.inductiveautomation.historian.gateway.HistorianManagerImpl
- All Implemented Interfaces:
HistorianManager
,ExtensionPointManager<com.inductiveautomation.historian.gateway.api.HistorianExtensionPoint<?>>
,TagHistoryManager
,ModuleService
public class HistorianManagerImpl
extends Object
implements TagHistoryManager, HistorianManager, ExtensionPointManager<com.inductiveautomation.historian.gateway.api.HistorianExtensionPoint<?>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyAnnotationChanges
(List<AnnotationChangePoint> annotationChangePoints) applySourceChanges
(List<SourceChangePoint> sourceChangePoints) browseHistoricalTags
(QualifiedPath root, BrowseFilter filter) ExtensionPointCollection<com.inductiveautomation.historian.gateway.api.HistorianExtensionPoint<?>>
Retrieves a collection of historian names available in the system.getQueryEngine
(String historianName) Retrieves theQueryEngine
associated with the specified historian name, if available.getQueryInterface
(String provider) getStorageEngine
(String historianName) Retrieves theStorageEngine
associated with the specified historian name, if available.boolean
Returns whether this gateway is licensed for storage.queryAnnotations
(AnnotationQueryOptions queryOptions) queryAnnotations
(List<? extends Path> paths, Date start, Date end, TypeFilter filter) void
queryDataPoints
(DataPointQueryOptions<?> queryOptions, ResultWriterOptions writerOptions, StreamingDatasetWriter datasetWriter) void
queryHistory
(TagHistoryQueryParams query, StreamingDatasetWriter writer) Queries the tag history system for the data as defined by the query parameters.void
queryHistoryDensity
(StreamingDatasetWriter writer, List<? extends Path> paths, Date start, Date end) Queries the tag store for data density information.queryHistoryDensity
(List<QualifiedPath> qpaths, Date start, Date end) queryMetadata
(MetadataQueryOptions queryOptions) void
setup
(GatewayContext context) void
shutdown()
void
startup()
storeAnnotationPoints
(List<AnnotationPoint> annotationPoints) storeAnnotations
(List<Annotation> annotations) Stores the given annotations.storeAtomicPoints
(List<AtomicPoint<?>> atomicPoints) void
storeLegacyHistoryData
(String historianName, List<TagHistoryData> tagHistoryData) storeMetadataPoints
(List<MetadataPoint> metadataPoints)
-
Constructor Details
-
HistorianManagerImpl
public HistorianManagerImpl()
-
-
Method Details
-
setup
- Throws:
Exception
-
isLicensedForStorage
public boolean isLicensedForStorage()Description copied from interface:TagHistoryManager
Returns whether this gateway is licensed for storage.- Specified by:
isLicensedForStorage
in interfaceTagHistoryManager
- Returns:
- true if data can be stored.
-
startup
public void startup() -
shutdown
public void shutdown() -
getExtensionPointResourceType
- Specified by:
getExtensionPointResourceType
in interfaceExtensionPointManager<com.inductiveautomation.historian.gateway.api.HistorianExtensionPoint<?>>
-
getExtensionPointCollection
public ExtensionPointCollection<com.inductiveautomation.historian.gateway.api.HistorianExtensionPoint<?>> getExtensionPointCollection()- Specified by:
getExtensionPointCollection
in interfaceExtensionPointManager<com.inductiveautomation.historian.gateway.api.HistorianExtensionPoint<?>>
-
queryMetadata
-
queryDataPoints
public void queryDataPoints(DataPointQueryOptions<?> queryOptions, ResultWriterOptions writerOptions, StreamingDatasetWriter datasetWriter) -
storeAtomicPoints
-
storeMetadataPoints
-
storeAnnotationPoints
-
applySourceChanges
-
applyAnnotationChanges
-
getStatus
- Specified by:
getStatus
in interfaceTagHistoryManager
-
getQueryInterface
- Specified by:
getQueryInterface
in interfaceTagHistoryManager
-
queryHistory
Description copied from interface:TagHistoryManager
Queries the tag history system for the data as defined by the query parameters. The results are written to the providedStreamingDatasetWriter
. This allows results to be streamed and not collected in memory. However, in order to get a simple Dataset result, simply use theBasicStreamingDataset
.- Specified by:
queryHistory
in interfaceTagHistoryManager
-
queryHistoryDensity
public void queryHistoryDensity(StreamingDatasetWriter writer, List<? extends Path> paths, Date start, Date end) throws Exception Description copied from interface:TagHistoryManager
Queries the tag store for data density information. Will return a structure with two columns: a timestamp, and the "weight", which is not really defined, but instead relative across the return set. The weight is valid until the next entry.- Specified by:
queryHistoryDensity
in interfaceTagHistoryManager
- Throws:
Exception
-
queryHistoryDensity
public TimelineSet queryHistoryDensity(List<QualifiedPath> qpaths, Date start, Date end) throws Exception - Specified by:
queryHistoryDensity
in interfaceTagHistoryManager
- Throws:
Exception
-
queryAnnotations
-
queryAnnotations
public List<Annotation> queryAnnotations(List<? extends Path> paths, Date start, Date end, TypeFilter filter) - Specified by:
queryAnnotations
in interfaceTagHistoryManager
-
storeAnnotations
Description copied from interface:TagHistoryManager
Stores the given annotations. Returns the new id of the stored annotation, if the quality code is good.- Specified by:
storeAnnotations
in interfaceTagHistoryManager
- Returns:
- a 1-to-1 result for each annotation, with the result quality, and the new storage id if successful.
-
browseHistoricalTags
public Results<Result> browseHistoricalTags(QualifiedPath root, @Nullable BrowseFilter filter) throws InvalidQualifiedPathException - Specified by:
browseHistoricalTags
in interfaceTagHistoryManager
- Throws:
InvalidQualifiedPathException
-
browseHistoricalProviders
-
getStorageEngine
Description copied from interface:HistorianManager
Retrieves theStorageEngine
associated with the specified historian name, if available. TheStorageEngine
serves as the interface for managing data storage and retrieval operations for the given historian.- Specified by:
getStorageEngine
in interfaceHistorianManager
- Parameters:
historianName
- the name of the historian for which the storage engine is to be retrieved; must not be null- Returns:
- an
Optional
containing theStorageEngine
if one is available for the specified historian, or an emptyOptional
otherwise
-
getQueryEngine
Description copied from interface:HistorianManager
Retrieves theQueryEngine
associated with the specified historian name, if available. TheQueryEngine
provides methods for querying historical data managed by the specified historian.- Specified by:
getQueryEngine
in interfaceHistorianManager
- Parameters:
historianName
- the name of the historian for which the query engine is to be retrieved; must not be null- Returns:
- an
Optional
containing theQueryEngine
if one is available for the specified historian, or an emptyOptional
otherwise
-
getHistorianNames
Description copied from interface:HistorianManager
Retrieves a collection of historian names available in the system.- Specified by:
getHistorianNames
in interfaceHistorianManager
- Returns:
- a
Collection
ofString
representing the names of available historians
-
getTagHistoryProviders
- Specified by:
getTagHistoryProviders
in interfaceTagHistoryManager
-
storeLegacyHistoryData
public void storeLegacyHistoryData(String historianName, List<TagHistoryData> tagHistoryData) throws Exception - Throws:
Exception
-