Class ImmutableStorageStrategyMetrics
java.lang.Object
com.inductiveautomation.historian.gateway.api.storage.strategy.StorageStrategyMetrics
com.inductiveautomation.historian.gateway.api.storage.strategy.ImmutableStorageStrategyMetrics
An immutable
StorageStrategyMetrics snapshot holding the queued count and oldest dwell
directly. An accumulating PointStorageStrategy samples its queue and returns one from
PointStorageStrategy.metrics().- Since:
- 2027.02
-
Constructor Summary
ConstructorsConstructorDescriptionImmutableStorageStrategyMetrics(int queuedPointCount, long oldestDwellMillis) Creates a snapshot for a strategy that does not batch.ImmutableStorageStrategyMetrics(int queuedPointCount, long oldestDwellMillis, int batchCapacity) Creates a snapshot for a batching strategy. -
Method Summary
Modifier and TypeMethodDescriptionReturns the batch size the strategy currently flushes at, or empty if it does not flush in batches.booleaninthashCode()longReturns how long, in milliseconds, the oldest queued batch has waited; never negative, and0when nothing is queued.intReturns the number of points queued awaiting flush across every point type; never negative, and0when nothing is queued.toString()Methods inherited from class StorageStrategyMetrics
hasQueuedData
-
Constructor Details
-
ImmutableStorageStrategyMetrics
public ImmutableStorageStrategyMetrics(int queuedPointCount, long oldestDwellMillis) Creates a snapshot for a strategy that does not batch.- Parameters:
queuedPointCount- the points accumulating;>= 0oldestDwellMillis- the dwell time of the oldest queued batch in milliseconds;>= 0
-
ImmutableStorageStrategyMetrics
public ImmutableStorageStrategyMetrics(int queuedPointCount, long oldestDwellMillis, int batchCapacity) Creates a snapshot for a batching strategy.- Parameters:
queuedPointCount- the points accumulating;>= 0oldestDwellMillis- the dwell time of the oldest queued batch in milliseconds;>= 0batchCapacity- the most points one flush may carry now;> 0
-
-
Method Details
-
queuedPointCount
public int queuedPointCount()Description copied from class:StorageStrategyMetricsReturns the number of points queued awaiting flush across every point type; never negative, and0when nothing is queued.- Specified by:
queuedPointCountin classStorageStrategyMetrics
-
oldestDwellMillis
public long oldestDwellMillis()Description copied from class:StorageStrategyMetricsReturns how long, in milliseconds, the oldest queued batch has waited; never negative, and0when nothing is queued.- Specified by:
oldestDwellMillisin classStorageStrategyMetrics
-
batchCapacity
Description copied from class:StorageStrategyMetricsReturns the batch size the strategy currently flushes at, or empty if it does not flush in batches.- Overrides:
batchCapacityin classStorageStrategyMetrics
-
equals
-
hashCode
-
toString
-