Package io.atomix.raft.storage.log.entry
Record Class ConfigurationEntry
java.lang.Object
java.lang.Record
io.atomix.raft.storage.log.entry.ConfigurationEntry
- All Implemented Interfaces:
RaftEntry
public record ConfigurationEntry(long timestamp, Collection<RaftMember> members)
extends Record
implements RaftEntry
Stores a cluster configuration.
The ConfigurationEntry stores information relevant to a single cluster configuration
change. Configuration change entries store a collection of members which each
represent a server in the cluster. Each time the set of members changes or a property of a single
member changes, a new ConfigurationEntry must be logged for the configuration change.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationEntry(long timestamp, Collection<RaftMember> members) Creates an instance of aConfigurationEntryrecord 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.members()Returns the value of themembersrecord component.longReturns the value of thetimestamprecord component.toSerializable(long term, RaftEntrySerializer serializer) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConfigurationEntry
Creates an instance of aConfigurationEntryrecord class.- Parameters:
timestamp- the value for thetimestamprecord componentmembers- the value for themembersrecord component
-
-
Method Details
-
toSerializable
- Specified by:
toSerializablein interfaceRaftEntry
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
members
Returns the value of themembersrecord component.- Returns:
- the value of the
membersrecord component
-