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 booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelastIncludedrecord component.@Nullable SnapshotSourcesource()Returns the value of thesourcerecord component.final StringtoString()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 thelastIncludedrecord component.- Specified by:
lastIncludedin interfaceInstallableSnapshot- Returns:
- the value of the
lastIncludedrecord component
-
source
Returns the value of thesourcerecord component.- Specified by:
sourcein interfaceInstallableSnapshot- Returns:
- the value of the
sourcerecord component
-