Record Class ClusterSnapshot
java.lang.Object
java.lang.Record
com.societegenerale.failover.observable.metrics.ClusterSnapshot
- Record Components:
instanceId- the emitting instance's identifier (e.g.orders-service:host-7)summary- that instance's local KPI snapshotconfigEntries- that instance's@Failoverconfiguration, fromFailoverConfigSnapshotService; nevernull— a missing value (older peer, or the 2-arg constructor) normalises to empty
public record ClusterSnapshot(String instanceId, MetricsSummary summary, List<ConfigEntry> configEntries)
extends Record
The payload one instance pushes to the dashboard in
cluster.mode=shared-store: its own identity plus
the local MetricsSummary snapshot and its @Failover configuration. The receive time is
stamped server-side on ingest (the peer clock is not trusted for liveness), so it is intentionally not part
of this record.- Author:
- Anand Manissery
-
Constructor Summary
ConstructorsConstructorDescriptionClusterSnapshot(String instanceId, MetricsSummary summary) Backward-compat: no configuration payload.ClusterSnapshot(String instanceId, MetricsSummary summary, List<ConfigEntry> configEntries) Normalises anullconfigEntries(e.g. an older stored row) to an empty list. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconfigEntriesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinstanceIdrecord component.summary()Returns the value of thesummaryrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClusterSnapshot
Normalises anullconfigEntries(e.g. an older stored row) to an empty list. -
ClusterSnapshot
Backward-compat: no configuration payload.- Parameters:
instanceId- the emitting instance's identifiersummary- that instance's local KPI snapshot
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
instanceId
Returns the value of theinstanceIdrecord component.- Returns:
- the value of the
instanceIdrecord component
-
summary
Returns the value of thesummaryrecord component.- Returns:
- the value of the
summaryrecord component
-
configEntries
Returns the value of theconfigEntriesrecord component.- Returns:
- the value of the
configEntriesrecord component
-