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 aApplyLeaderSnapshot
record class. -
Method Summary
Modifier and TypeMethodDescriptioncallback()
Returns the value of thecallback
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thelastEntry
record component.leaderId()
Returns the value of theleaderId
record component.@Nullable VotingConfig
Returns the value of theserverConfig
record component.snapshot()
Returns the value of thesnapshot
record component.long
term()
Returns the value of theterm
record component.final String
toString()
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 aApplyLeaderSnapshot
record class.- Parameters:
leaderId
- the value for theleaderId
record componentterm
- the value for theterm
record componentlastEntry
- the value for thelastEntry
record componentsnapshot
- the value for thesnapshot
record componentserverConfig
- the value for theserverConfig
record componentcallback
- the value for thecallback
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
leaderId
Returns the value of theleaderId
record component.- Returns:
- the value of the
leaderId
record component
-
term
public long term()Returns the value of theterm
record component.- Returns:
- the value of the
term
record component
-
lastEntry
Returns the value of thelastEntry
record component.- Returns:
- the value of the
lastEntry
record component
-
snapshot
Returns the value of thesnapshot
record component.- Returns:
- the value of the
snapshot
record component
-
serverConfig
Returns the value of theserverConfig
record component.- Returns:
- the value of the
serverConfig
record component
-
callback
Returns the value of thecallback
record component.- Returns:
- the value of the
callback
record component
-