Package org.opendaylight.raft.spi
Record Class InstallableSnapshotSource
java.lang.Object
java.lang.Record
org.opendaylight.raft.spi.InstallableSnapshotSource
- Record Components:
lastIncluded
- last entry included in this snapshotsource
- theSnapshotSource
- All Implemented Interfaces:
InstallableSnapshot
@NonNullByDefault
public record InstallableSnapshotSource(EntryInfo lastIncluded, @Nullable SnapshotSource source)
extends Record
implements InstallableSnapshot
An
InstallableSnapshot
backed by a SnapshotSource
.-
Constructor Summary
ConstructorsConstructorDescriptionInstallableSnapshotSource
(long index, long term, SnapshotSource source) Convenience constructor.InstallableSnapshotSource
(EntryInfo lastIncluded, @Nullable SnapshotSource source) Default constructor. -
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.Returns the value of thelastIncluded
record component.@Nullable SnapshotSource
source()
Returns the value of thesource
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
InstallableSnapshotSource
Default constructor.- Parameters:
lastIncluded
- last entry included in this snapshotsource
- theSnapshotSource
-
InstallableSnapshotSource
Convenience constructor.- Parameters:
index
- index of last included entryterm
- term of last included entrysource
- theSnapshotSource
-
-
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)
. -
lastIncluded
Returns the value of thelastIncluded
record component.- Specified by:
lastIncluded
in interfaceInstallableSnapshot
- Returns:
- the value of the
lastIncluded
record component
-
source
Returns the value of thesource
record component.- Specified by:
source
in interfaceInstallableSnapshot
- Returns:
- the value of the
source
record component
-