Record Class RaftNode.SnapshotCapture
java.lang.Object
java.lang.Record
com.loomcache.server.consensus.RaftNode.SnapshotCapture
- Enclosing class:
RaftNode
public static record RaftNode.SnapshotCapture(byte[] snapshot, long index, long term)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionSnapshotCapture(byte[] snapshot, long index, long term) Creates an instance of aSnapshotCapturerecord class. -
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.longindex()Returns the value of theindexrecord component.byte[]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
-
SnapshotCapture
public SnapshotCapture(byte[] snapshot, long index, long term) Creates an instance of aSnapshotCapturerecord class.- Parameters:
snapshot- the value for thesnapshotrecord componentindex- the value for theindexrecord componentterm- the value for thetermrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
snapshot
public byte[] snapshot()Returns the value of thesnapshotrecord component.- Returns:
- the value of the
snapshotrecord component
-
index
public long index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
term
public long term()Returns the value of thetermrecord component.- Returns:
- the value of the
termrecord component
-