Class HistorySplitterProvider
java.lang.Object
com.inductiveautomation.historian.gateway.types.splitter.HistorySplitterProvider
- All Implemented Interfaces:
Historian<com.inductiveautomation.historian.gateway.types.splitter.config.HistorySplitterSettings>
,TagHistoryProvider<com.inductiveautomation.historian.gateway.types.splitter.config.HistorySplitterSettings>
,AnnotationStorageProvider
,TagHistoryQueryInterface
public class HistorySplitterProvider
extends Object
implements TagHistoryProvider<com.inductiveautomation.historian.gateway.types.splitter.config.HistorySplitterSettings>, AnnotationStorageProvider
This is the main class for the tag history splitter. It implements the TagHistoryProvider interface, which handles
querying, and also contains the data sink (which it registers with the store and forward system) to handle storage.
To keep things clean, the data sink could be broken out into its own class.
-
Constructor Summary
ConstructorsConstructorDescriptionHistorySplitterProvider
(GatewayContext context, String name, com.inductiveautomation.historian.gateway.types.splitter.config.HistorySplitterSettings settings) -
Method Summary
Modifier and TypeMethodDescriptionprotected List<Annotation>
adjustAnnotationToConnection
(List<Annotation> annotations, String connection) Updates the historical source in the annotation source, but by copying the annotation.protected QualifiedPath
adjustQPToConnection
(QualifiedPath path, String connection) protected List<QualifiedPath>
adjustQualifiedPathsToConnection
(List<QualifiedPath> paths, String connection) browse
(QualifiedPath root, BrowseFilter filter) createQuery
(List<ColumnQueryDefinition> columnDefinitions, QueryController controller) Returns a list of aggregate functions that can be used with the server.getName()
Retrieves the name of the historian.protected TagHistoryQueryInterface
getProvider
(String name) com.inductiveautomation.historian.gateway.types.splitter.config.HistorySplitterSettings
Retrieves the settings associated with the historian.Retrieves the current status of the historian.boolean
protected boolean
isAvailable
(String name) queryAnnotations
(List<QualifiedPath> paths, Date start, Date end, TypeFilter filter, String queryId) queryDensity
(List<QualifiedPath> paths, Date start, Date end, String queryId) protected String
selectHistorian
(Date start) void
shutdown()
Shuts down the historian and any associated resources.void
startup()
Starts the historian and initializes any necessary resources required for its operation.storeAnnotations
(List<Annotation> annotations) void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.inductiveautomation.historian.gateway.api.Historian
getPathAdapter, getQueryEngine, handleNameChange, handleSettingsChange
Methods inherited from interface com.inductiveautomation.historian.gateway.legacy.TagHistoryProvider
getStorageEngine
-
Constructor Details
-
HistorySplitterProvider
public HistorySplitterProvider(GatewayContext context, String name, com.inductiveautomation.historian.gateway.types.splitter.config.HistorySplitterSettings settings)
-
-
Method Details
-
validateConnections
public void validateConnections() -
startup
public void startup()Description copied from interface:Historian
Starts the historian and initializes any necessary resources required for its operation. This method is responsible for setting up the internal state of the historian and preparing it to handle incoming requests or data processing.Implementations may include the following operations: - Allocating and initializing required resources. - Establishing connections to external systems or storage backends. - Setting up any internal scheduling or maintenance tasks.
If this method is invoked when the historian is already started, an
IllegalStateException
may be thrown to prevent duplicate initialization. -
shutdown
public void shutdown()Description copied from interface:Historian
Shuts down the historian and any associated resources. This method is responsible for ensuring that the historian ceases operations cleanly and releases any allocated resources. Once invoked, the historian should no longer accept or process new requests.Implementations may include tasks such as: - Stopping active data processing tasks. - Freeing up connections to external systems or storage. - Logging a shutdown message for diagnostic or auditing purposes.
If this method is overridden in a subclass, it is recommended to call the superclass implementation to ensure proper cleanup behavior.
-
getName
Description copied from interface:Historian
Retrieves the name of the historian. -
getSettings
public com.inductiveautomation.historian.gateway.types.splitter.config.HistorySplitterSettings getSettings()Description copied from interface:Historian
Retrieves the settings associated with the historian. The returned settings provide configuration details specific to the historian's operation.- Specified by:
getSettings
in interfaceHistorian<com.inductiveautomation.historian.gateway.types.splitter.config.HistorySplitterSettings>
- Returns:
- an instance of
S
representing the settings of the historian
-
isAvailable
public boolean isAvailable() -
isAvailable
-
adjustQualifiedPathsToConnection
protected List<QualifiedPath> adjustQualifiedPathsToConnection(List<QualifiedPath> paths, String connection) -
adjustQPToConnection
-
adjustAnnotationToConnection
protected List<Annotation> adjustAnnotationToConnection(List<Annotation> annotations, String connection) Updates the historical source in the annotation source, but by copying the annotation. Does not mutate the original value. -
getProvider
-
selectHistorian
-
getStatus
Description copied from interface:Historian
Retrieves the current status of the historian.- Specified by:
getStatus
in interfaceHistorian<com.inductiveautomation.historian.gateway.types.splitter.config.HistorySplitterSettings>
- Returns:
- the current
ProfileStatus
, indicating the general state and optional message describing the historian's operational state.
-
browse
- Specified by:
browse
in interfaceTagHistoryQueryInterface
-
createQuery
public HistoryQueryExecutor createQuery(List<ColumnQueryDefinition> columnDefinitions, QueryController controller) - Specified by:
createQuery
in interfaceTagHistoryQueryInterface
-
getAvailableAggregates
Description copied from interface:TagHistoryQueryInterface
Returns a list of aggregate functions that can be used with the server. Only expected to be valid if the server is enabled and available. Also, should only return null if the aggregates can not be retrieved for some reason. If the server simply does not support any aggregate functions, an empty list should be returned.- Specified by:
getAvailableAggregates
in interfaceTagHistoryQueryInterface
-
queryDensity
public TimelineSet queryDensity(List<QualifiedPath> paths, Date start, Date end, String queryId) throws Exception - Specified by:
queryDensity
in interfaceTagHistoryQueryInterface
- Throws:
Exception
-
queryAnnotations
public List<Annotation> queryAnnotations(List<QualifiedPath> paths, Date start, Date end, TypeFilter filter, String queryId) throws Exception - Specified by:
queryAnnotations
in interfaceTagHistoryQueryInterface
- Throws:
Exception
-
storeAnnotations
- Specified by:
storeAnnotations
in interfaceAnnotationStorageProvider
-