Class StorageStrategyMetrics
java.lang.Object
com.inductiveautomation.historian.gateway.api.storage.strategy.StorageStrategyMetrics
- Direct Known Subclasses:
ImmutableStorageStrategyMetrics
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the batch size the strategy currently flushes at, or empty if it does not flush in batches.final booleanWhetherqueuedPointCount()is greater than zero.abstract longReturns how long, in milliseconds, the oldest queued batch has waited; never negative, and0when nothing is queued.abstract intReturns the number of points queued awaiting flush across every point type; never negative, and0when nothing is queued.
-
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, and0when nothing is queued. -
oldestDwellMillis
public abstract long oldestDwellMillis()Returns how long, in milliseconds, the oldest queued batch has waited; never negative, and0when nothing is queued. -
batchCapacity
Returns the batch size the strategy currently flushes at, or empty if it does not flush in batches. -
hasQueuedData
public final boolean hasQueuedData()WhetherqueuedPointCount()is greater than zero.
-