Class ClusterSnapshotPublisher
java.lang.Object
com.societegenerale.failover.observable.micrometer.AbstractSnapshotPublisher
com.societegenerale.failover.observable.micrometer.ThresholdSnapshotPublisher
com.societegenerale.failover.observable.micrometer.ClusterSnapshotPublisher
- All Implemented Interfaces:
SnapshotPublisher
Concrete
ThresholdSnapshotPublisher that builds a ClusterSnapshot from the local
FailoverMetricsSnapshotService and delivers it via a SnapshotPushClient.
Inherits time-threshold gating from ThresholdSnapshotPublisher (at most one push per
intervalSeconds) and event-driven dispatch from AbstractSnapshotPublisher (async,
virtual-thread executor injected by autoconfiguration; no push when the app is idle).
Owns backoff state: on first failure a single WARN is emitted and push() becomes a
no-op until retryIntervalSeconds elapses. On recovery an INFO is logged. Has no dependency
on any specific HTTP client — the transport is injected via SnapshotPushClient.
- Author:
- Anand Manissery
-
Constructor Summary
ConstructorsConstructorDescriptionClusterSnapshotPublisher(FailoverMetricsSnapshotService metricsService, InstanceIdResolver instanceIdResolver, SnapshotPushClient pushClient, String publishUrl, int intervalSeconds, int retryIntervalSeconds, Executor executor) -
Method Summary
Methods inherited from class com.societegenerale.failover.observable.micrometer.ThresholdSnapshotPublisher
shouldPublishMethods inherited from class com.societegenerale.failover.observable.micrometer.AbstractSnapshotPublisher
onPublish
-
Constructor Details
-
ClusterSnapshotPublisher
public ClusterSnapshotPublisher(FailoverMetricsSnapshotService metricsService, InstanceIdResolver instanceIdResolver, SnapshotPushClient pushClient, String publishUrl, int intervalSeconds, int retryIntervalSeconds, Executor executor)
-
-
Method Details
-
push
public void push()
-