java.lang.Object
com.societegenerale.failover.dashboard.metrics.source.sharedstore.ClusterSeriesStore

public class ClusterSeriesStore extends Object
Bounded, time-ordered ring of cluster-wide trend points for cluster.mode=shared-store, pruned by a RetentionPolicy (age + size, oldest first). Fed by ClusterSeriesSampler; read by SharedStoreMetricsSource.series(...). In-memory — bounded trend history, not a TSDB.
Author:
Anand Manissery
  • Constructor Details

    • ClusterSeriesStore

      public ClusterSeriesStore(RetentionPolicy retention)
      Creates a new store bounded by retention.
      Parameters:
      retention - the size/age bounds to prune by
  • Method Details

    • append

      public void append(SeriesPoint point)
      Appends a point (assumed newest) and prunes by size then age.
      Parameters:
      point - the newest series point
    • series

      public List<SeriesPoint> series(long windowSec)
      Returns retained points within the given window.
      Parameters:
      windowSec - only points captured within this many seconds of now (<= 0 returns all retained)
      Returns:
      retained points in chronological order
    • size

      public int size()
      Current number of retained points (diagnostics / tests).
      Returns:
      the retained point count