Package io.atomix.raft.storage.system
Record Class MetaStoreRecord
java.lang.Object
java.lang.Record
io.atomix.raft.storage.system.MetaStoreRecord
public record MetaStoreRecord(long term, long lastFlushedIndex, long commitIndex, String votedFor)
extends Record
Represents information stored in the MetaStore with "Meta" SBE message (see
raft-entry-schema.xml)
-
Constructor Summary
ConstructorsConstructorDescriptionMetaStoreRecord(long term, long lastFlushedIndex, long commitIndex, String votedFor) Creates an instance of aMetaStoreRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecommitIndexrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thelastFlushedIndexrecord component.longterm()Returns the value of thetermrecord component.final StringtoString()Returns a string representation of this record class.votedFor()Returns the value of thevotedForrecord component.
-
Constructor Details
-
MetaStoreRecord
Creates an instance of aMetaStoreRecordrecord class.- Parameters:
term- the value for thetermrecord componentlastFlushedIndex- the value for thelastFlushedIndexrecord componentcommitIndex- the value for thecommitIndexrecord componentvotedFor- the value for thevotedForrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
term
public long term()Returns the value of thetermrecord component.- Returns:
- the value of the
termrecord component
-
lastFlushedIndex
public long lastFlushedIndex()Returns the value of thelastFlushedIndexrecord component.- Returns:
- the value of the
lastFlushedIndexrecord component
-
commitIndex
public long commitIndex()Returns the value of thecommitIndexrecord component.- Returns:
- the value of the
commitIndexrecord component
-
votedFor
Returns the value of thevotedForrecord component.- Returns:
- the value of the
votedForrecord component
-