Record Class RaftSnapshot
java.lang.Object
java.lang.Record
org.opendaylight.controller.cluster.raft.spi.RaftSnapshot
@NonNullByDefault
public record RaftSnapshot(@Nullable VotingConfig votingConfig, List<LogEntry> unappliedEntries)
extends Record
Atomic information retained in a snapshot file. Unapplied entries are those that have been known to have been
stored in the journal -- which allows for transitioning from non-persistent to persistent state.
-
Constructor Summary
ConstructorsConstructorDescriptionRaftSnapshot
(@Nullable VotingConfig votingConfig, List<LogEntry> unappliedEntries) Creates an instance of aRaftSnapshot
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.Returns the value of theunappliedEntries
record component.@Nullable VotingConfig
Returns the value of thevotingConfig
record component.
-
Constructor Details
-
RaftSnapshot
Creates an instance of aRaftSnapshot
record class.- Parameters:
votingConfig
- the value for thevotingConfig
record componentunappliedEntries
- the value for theunappliedEntries
record 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. All components in this record class are compared withObjects::equals(Object,Object)
. -
votingConfig
Returns the value of thevotingConfig
record component.- Returns:
- the value of the
votingConfig
record component
-
unappliedEntries
Returns the value of theunappliedEntries
record component.- Returns:
- the value of the
unappliedEntries
record component
-