Interface Historian<S extends HistorianSettings>

Type Parameters:
S - the historian's settings type.
All Known Subinterfaces:
TagHistoryProvider<S>
All Known Implementing Classes:
AbstractHistorian, LegacyTagHistoryProviderAdapter

public interface Historian<S extends HistorianSettings>
A historian: a named, configurable provider that owns a storage engine and/or a query engine for historical data, with a startup and shutdown lifecycle.
  • Method Details

    • startup

      void startup() throws Exception
      Starts the historian: allocates resources, connects to backends and schedules maintenance. May throw IllegalStateException if already started.
      Throws:
      Exception - if startup fails.
    • shutdown

      void shutdown()
      Stops the historian and releases its resources. It must not accept new requests afterwards. Overrides should call super.
    • getName

      String getName()
      Returns the historian's name.
    • getSettings

      S getSettings()
      Returns the historian's settings.
    • getStatus

      ProfileStatus getStatus()
      Returns the status shown on the Historians page and reported to the health check.
    • getQueryEngine

      default Optional<QueryEngine> getQueryEngine()
      Returns this historian's query engine, or empty (the default) if it has none.
    • getStorageEngine

      default Optional<StorageEngine> getStorageEngine()
      Returns this historian's storage engine, or empty (the default) if it has none.
    • getPathAdapter

      default QualifiedPathAdapter getPathAdapter()
      Returns the adapter used to normalize paths; QualifiedPathAdapter.DEFAULT by default.
    • handleNameChange

      default boolean handleNameChange(String newName)
      Applies a new name without a restart if the historian supports it.
      Parameters:
      newName - the new name.
      Returns:
      true if applied; false if the historian needs a restart or a new instance.
    • handleSettingsChange

      default boolean handleSettingsChange(S newSettings)
      Applies new settings without a restart if the historian supports it.
      Parameters:
      newSettings - the new settings.
      Returns:
      true if applied; false if the historian needs a restart or a new instance.
    • handleResourceDeleted

      default void handleResourceDeleted()
      Called, before shutdown(), when the gateway resource backing this historian is deleted; not called on normal shutdown or restart. Implementations must remove all backend storage tied to the historian, both store-and-forward caches and persisted data. The default does nothing, which suits historians whose state ends with the resource.

      May be called more than once for the same deletion, so cleanup must tolerate already-removed state. Log cleanup failures rather than throwing; the resource is already removed from configuration, so an exception cannot block the deletion.

      Since:
      8.3.5