java.lang.Object
com.inductiveautomation.historian.gateway.api.storage.strategy.PointStorageStrategy
Direct Known Subclasses:
DebounceStorageStrategy, ImmediateStorageStrategy

public abstract class PointStorageStrategy extends Object
Abstract class representing a strategy for storing points in a historian system. This class provides methods for processing different types of points and managing the lifecycle of the storage strategy.
  • Field Details

    • SHUTDOWN_FAILURE_CODE

      protected static final QualityCode SHUTDOWN_FAILURE_CODE
      QualityCode indicating a failure due to shutdown. No more points will be accepted once this code is triggered.
  • Constructor Details

    • PointStorageStrategy

      public PointStorageStrategy()
  • Method Details

    • processAtomic

      public abstract CompletionStage<StorageResult<AtomicPoint<?>>> processAtomic(List<AtomicPoint<?>> atomicPoints)
      Processes a list of atomic points asynchronously.
      Parameters:
      atomicPoints - The list of atomic points to process.
      Returns:
      A CompletionStage representing the result of the storage operation.
    • processComplex

      public abstract <C extends ComplexPoint<?>> CompletionStage<StorageResult<C>> processComplex(List<C> complexPoints)
      Processes a list of complex points asynchronously.
      Type Parameters:
      C - The type of complex points.
      Parameters:
      complexPoints - The list of complex points to process.
      Returns:
      A CompletionStage representing the result of the storage operation.
    • processChanges

      public abstract <C extends ChangePoint<?>> CompletionStage<StorageResult<C>> processChanges(List<C> changePoints)
      Processes a list of change points asynchronously.
      Type Parameters:
      C - The type of change points.
      Parameters:
      changePoints - The list of change points to process.
      Returns:
      A CompletionStage representing the result of the storage operation.
    • shutdown

      public abstract void shutdown()
      Shuts down the storage strategy, preventing further processing of points.
    • forwardPoints

      protected final void forwardPoints(TemporalPointBatch<?> batch)
      Forwards a batch of temporal points to the registered listener, if one exists.
      Parameters:
      batch - The batch of temporal points to forward.
    • onPointsReady

      public final void onPointsReady(PointStorageStrategy.Listener pointsConsumer)
      Registers a listener to handle batches of temporal points when they are ready.
      Parameters:
      pointsConsumer - The listener to register.