Record Class SnapshotManager.ApplyLeaderSnapshot
java.lang.Object
java.lang.Record
org.opendaylight.controller.cluster.raft.SnapshotManager.ApplyLeaderSnapshot
- Enclosing class:
SnapshotManager
@NonNullByDefault
public static record SnapshotManager.ApplyLeaderSnapshot(String leaderId, long term, EntryInfo lastEntry, SnapshotSource snapshot, @Nullable VotingConfig serverConfig, SnapshotManager.ApplyLeaderSnapshot.Callback callback)
extends Record
Internal message, issued by follower behavior to its actor, eventually routed to
SnapshotManager.
Metadata matches information conveyed in InstallSnapshot.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionApplyLeaderSnapshot(String leaderId, long term, EntryInfo lastEntry, SnapshotSource snapshot, @Nullable VotingConfig serverConfig, SnapshotManager.ApplyLeaderSnapshot.Callback callback) Creates an instance of aApplyLeaderSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncallback()Returns the value of thecallbackrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelastEntryrecord component.leaderId()Returns the value of theleaderIdrecord component.@Nullable VotingConfigReturns the value of theserverConfigrecord component.snapshot()Returns the value of thesnapshotrecord component.longterm()Returns the value of thetermrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ApplyLeaderSnapshot
public ApplyLeaderSnapshot(String leaderId, long term, EntryInfo lastEntry, SnapshotSource snapshot, @Nullable VotingConfig serverConfig, SnapshotManager.ApplyLeaderSnapshot.Callback callback) Creates an instance of aApplyLeaderSnapshotrecord class.- Parameters:
leaderId- the value for theleaderIdrecord componentterm- the value for thetermrecord componentlastEntry- the value for thelastEntryrecord componentsnapshot- the value for thesnapshotrecord componentserverConfig- the value for theserverConfigrecord componentcallback- the value for thecallbackrecord 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 '=='. -
leaderId
Returns the value of theleaderIdrecord component.- Returns:
- the value of the
leaderIdrecord component
-
term
public long term()Returns the value of thetermrecord component.- Returns:
- the value of the
termrecord component
-
lastEntry
Returns the value of thelastEntryrecord component.- Returns:
- the value of the
lastEntryrecord component
-
snapshot
Returns the value of thesnapshotrecord component.- Returns:
- the value of the
snapshotrecord component
-
serverConfig
Returns the value of theserverConfigrecord component.- Returns:
- the value of the
serverConfigrecord component
-
callback
Returns the value of thecallbackrecord component.- Returns:
- the value of the
callbackrecord component
-