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 snapshot
The payload one instance pushes to the dashboard in
cluster.mode=shared-store: its own identity plus
the local MetricsSummary snapshot. 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) Creates an instance of aClusterSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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
Creates an instance of aClusterSnapshotrecord class.- Parameters:
instanceId- the value for theinstanceIdrecord componentsummary- the value for thesummaryrecord component
-
-
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
-