Class StorageStrategyMetrics

java.lang.Object
com.inductiveautomation.historian.gateway.api.storage.strategy.StorageStrategyMetrics
Direct Known Subclasses:
ImmutableStorageStrategyMetrics

public abstract class StorageStrategyMetrics extends Object
A point-in-time reading of the data accumulating in a PointStorageStrategy that buffers work before flushing it, reported by PointStorageStrategy.metrics().

Every accumulating strategy reports how much is queued (queuedPointCount()) and how long the oldest of it has waited (oldestDwellMillis()), the two signals a backpressure or divert decision needs. It is abstract so a strategy can supply a live view or backend-specific counters; ImmutableStorageStrategyMetrics is a ready snapshot.

Since:
2027.02
  • Constructor Details

    • StorageStrategyMetrics

      protected StorageStrategyMetrics()
  • Method Details

    • queuedPointCount

      public abstract int queuedPointCount()
      Returns the number of points queued awaiting flush across every point type; never negative, and 0 when nothing is queued.
    • oldestDwellMillis

      public abstract long oldestDwellMillis()
      Returns how long, in milliseconds, the oldest queued batch has waited; never negative, and 0 when nothing is queued.
    • batchCapacity

      public OptionalInt batchCapacity()
      Returns the batch size the strategy currently flushes at, or empty if it does not flush in batches.
    • hasQueuedData

      public final boolean hasQueuedData()
      Whether queuedPointCount() is greater than zero.