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 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.

      Specified by:
      startup in interface Historian<com.inductiveautomation.historian.gateway.types.splitter.config.HistorySplitterSettings>
    • 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.

      Specified by:
      shutdown in interface Historian<com.inductiveautomation.historian.gateway.types.splitter.config.HistorySplitterSettings>
    • getName

      public String getName()
      Description copied from interface: Historian
      Retrieves the name of the historian.
      Specified by:
      getName in interface Historian<com.inductiveautomation.historian.gateway.types.splitter.config.HistorySplitterSettings>
      Returns:
      the name of the historian as a String
    • 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 interface Historian<com.inductiveautomation.historian.gateway.types.splitter.config.HistorySplitterSettings>
      Returns:
      an instance of S representing the settings of the historian
    • isAvailable

      public boolean isAvailable()
    • isAvailable

      protected boolean isAvailable(String name)
    • adjustQualifiedPathsToConnection

      protected List<QualifiedPath> adjustQualifiedPathsToConnection(List<QualifiedPath> paths, String connection)
    • adjustQPToConnection

      protected QualifiedPath adjustQPToConnection(QualifiedPath path, String connection)
    • 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

      protected TagHistoryQueryInterface getProvider(String name)
    • selectHistorian

      protected String selectHistorian(Date start)
    • getStatus

      public ProfileStatus getStatus()
      Description copied from interface: Historian
      Retrieves the current status of the historian.
      Specified by:
      getStatus in interface Historian<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

      public Results<Result> browse(QualifiedPath root, BrowseFilter filter)
      Specified by:
      browse in interface TagHistoryQueryInterface
    • createQuery

      public HistoryQueryExecutor createQuery(List<ColumnQueryDefinition> columnDefinitions, QueryController controller)
      Specified by:
      createQuery in interface TagHistoryQueryInterface
    • getAvailableAggregates

      public List<Aggregate> 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 interface TagHistoryQueryInterface
    • queryDensity

      public TimelineSet queryDensity(List<QualifiedPath> paths, Date start, Date end, String queryId) throws Exception
      Specified by:
      queryDensity in interface TagHistoryQueryInterface
      Throws:
      Exception
    • queryAnnotations

      public List<Annotation> queryAnnotations(List<QualifiedPath> paths, Date start, Date end, TypeFilter filter, String queryId) throws Exception
      Specified by:
      queryAnnotations in interface TagHistoryQueryInterface
      Throws:
      Exception
    • storeAnnotations

      public List<QualifiedValue> storeAnnotations(List<Annotation> annotations)
      Specified by:
      storeAnnotations in interface AnnotationStorageProvider