Class FailoverConfigSnapshotService

java.lang.Object
com.societegenerale.failover.observable.metrics.FailoverConfigSnapshotService

public class FailoverConfigSnapshotService extends Object
Rebuilds the @Failover configuration view from the failover.config.expiry.seconds and failover.config.global gauges that FailoverMeterBinder registers. Reads only — it never registers a new meter, so it is a pure consumer of signals the framework already publishes, with no dependency on FailoverScanner.

Used both by the dashboard (local mode) and by peer apps (to build ClusterSnapshots for the shared-store cluster tier) — the same split responsibility as FailoverMetricsSnapshotService.

Author:
Anand Manissery
  • Constructor Details

    • FailoverConfigSnapshotService

      public FailoverConfigSnapshotService(io.micrometer.core.instrument.MeterRegistry registry)
      Creates a new snapshot service reading from registry.
      Parameters:
      registry - the meter registry to read failover.config.* gauges from
  • Method Details

    • configEntries

      public List<ConfigEntry> configEntries()
      Rebuilds the configuration view from the emitted gauges.
      Returns:
      one ConfigEntry per @Failover discovered via emitted gauges, sorted by name; never null.