Record Class ConsensusStatus
java.lang.Object
java.lang.Record
org.j7m.middleware.api.consensus.ConsensusStatus
- Record Components:
groupId- group idleaderId- current leader if knownstates- node statesmetrics- aggregate metricssnapshotSupported- whether snapshot installation is supporteddynamicMembershipSupported- whether dynamic membership is supported
- All Implemented Interfaces:
Serializable
public record ConsensusStatus(ConsensusGroupId groupId, ConsensusNodeId leaderId, List<ConsensusState> states, ConsensusMetricsSnapshot metrics, boolean snapshotSupported, boolean dynamicMembershipSupported)
extends Record
implements Serializable
Safe group status snapshot.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConsensusStatus(ConsensusGroupId groupId, ConsensusNodeId leaderId, List<ConsensusState> states, ConsensusMetricsSnapshot metrics, boolean snapshotSupported, boolean dynamicMembershipSupported) Creates a status snapshot. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thedynamicMembershipSupportedrecord component.final booleanIndicates whether some other object is "equal to" this one.groupId()Returns the value of thegroupIdrecord component.final inthashCode()Returns a hash code value for this object.leaderId()Returns the value of theleaderIdrecord component.metrics()Returns the value of themetricsrecord component.booleanReturns the value of thesnapshotSupportedrecord component.states()Returns the value of thestatesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConsensusStatus
public ConsensusStatus(ConsensusGroupId groupId, ConsensusNodeId leaderId, List<ConsensusState> states, ConsensusMetricsSnapshot metrics, boolean snapshotSupported, boolean dynamicMembershipSupported) Creates a status snapshot.
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
groupId
-
leaderId
-
states
-
metrics
-
snapshotSupported
public boolean snapshotSupported()Returns the value of thesnapshotSupportedrecord component.- Returns:
- the value of the
snapshotSupportedrecord component
-
dynamicMembershipSupported
public boolean dynamicMembershipSupported()Returns the value of thedynamicMembershipSupportedrecord component.- Returns:
- the value of the
dynamicMembershipSupportedrecord component
-