Record Class ConsensusConfiguration
java.lang.Object
java.lang.Record
org.j7m.middleware.api.consensus.ConsensusConfiguration
- Record Components:
groupId- group idmembers- fixed membersheartbeatInterval- heartbeat intervalelectionTimeout- election timeout
- All Implemented Interfaces:
Serializable
public record ConsensusConfiguration(ConsensusGroupId groupId, ConsensusMemberSet members, Duration heartbeatInterval, Duration electionTimeout)
extends Record
implements Serializable
Fixed consensus group configuration.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConsensusConfiguration(ConsensusGroupId groupId, ConsensusMemberSet members, Duration heartbeatInterval, Duration electionTimeout) Creates a configuration. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theelectionTimeoutrecord 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.Returns the value of theheartbeatIntervalrecord component.members()Returns the value of themembersrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConsensusConfiguration
public ConsensusConfiguration(ConsensusGroupId groupId, ConsensusMemberSet members, Duration heartbeatInterval, Duration electionTimeout) Creates a configuration.
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
groupId
-
members
-
heartbeatInterval
Returns the value of theheartbeatIntervalrecord component.- Returns:
- the value of the
heartbeatIntervalrecord component
-
electionTimeout
Returns the value of theelectionTimeoutrecord component.- Returns:
- the value of the
electionTimeoutrecord component
-