Package org.opendaylight.raft.api
Record Class EntryInfo
java.lang.Object
java.lang.Record
org.opendaylight.raft.api.EntryInfo
- Record Components:
index- log entry indexterm- log entry term
- All Implemented Interfaces:
EntryMeta
@NonNullByDefault
public record EntryInfo(long index, long term)
extends Record
implements EntryMeta
An immutable
EntryMeta.-
Constructor Summary
Constructors -
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.longindex()Returns the value of theindexrecord component.static EntryInfoof(long index, long term) Return anEntryInfowith specified index and term.static EntryInfostatic @Nullable EntryInfoofNullable(@Nullable EntryMeta meta) longterm()Returns the value of thetermrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EntryInfo
public EntryInfo(long index, long term) Default constructor.- Parameters:
index- log entry indexterm- log entry term
-
-
Method Details
-
of
Return anEntryInfowith specified index and term.- Parameters:
index- the indexterm- the term- Returns:
- an
EntryInfo
-
of
-
ofNullable
-
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 with '=='. -
index
public long index()Returns the value of theindexrecord component. -
term
public long term()Returns the value of thetermrecord component.
-