Class ClusterSeriesSampler
java.lang.Object
com.societegenerale.failover.dashboard.metrics.source.sharedstore.ClusterSeriesSampler
- All Implemented Interfaces:
AutoCloseable
Periodically samples the merged cluster aggregate (a
MetricsSource) into a ClusterSeriesStore,
producing the cluster-wide trend for cluster.mode=shared-store.
Reset-aware monotonic cumulative (consistency rule, design §5.3). SeriesPoints are
cumulative and the UI deltas consecutive points. When a peer restarts, its counters reset to zero, so the raw
cluster sum drops — naive cumulative would yield a negative delta. This sampler instead accumulates a
monotonic adjusted total: per field it adds max(increase, freshValueAfterReset) so the series never
decreases and post-reset activity is still counted.
Runs on a single daemon thread; stopped on shutdown.
- Author:
- Anand Manissery
-
Constructor Summary
ConstructorsConstructorDescriptionClusterSeriesSampler(MetricsSource source, ClusterSeriesStore store, int intervalSeconds) -
Method Summary
-
Constructor Details
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-