Package io.atomix.raft.storage.log.entry
Record Class UnserializedApplicationEntry
java.lang.Object
java.lang.Record
io.atomix.raft.storage.log.entry.UnserializedApplicationEntry
- All Implemented Interfaces:
ApplicationEntry,RaftEntry
public record UnserializedApplicationEntry(long lowestPosition, long highestPosition, BufferWriter dataWriter)
extends Record
implements ApplicationEntry
An
ApplicationEntry with unserialized application data. Used for writing new entries to
the log.-
Constructor Summary
ConstructorsConstructorDescriptionUnserializedApplicationEntry(long lowestPosition, long highestPosition, BufferWriter dataWriter) Creates an instance of aUnserializedApplicationEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedataWriterrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thehighestPositionrecord component.longReturns the value of thelowestPositionrecord component.toSerializable(long term, RaftEntrySerializer serializer) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UnserializedApplicationEntry
public UnserializedApplicationEntry(long lowestPosition, long highestPosition, BufferWriter dataWriter) Creates an instance of aUnserializedApplicationEntryrecord class.- Parameters:
lowestPosition- the value for thelowestPositionrecord componenthighestPosition- the value for thehighestPositionrecord componentdataWriter- the value for thedataWriterrecord component
-
-
Method Details
-
toSerializable
- Specified by:
toSerializablein interfaceRaftEntry
-
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 '=='. -
lowestPosition
public long lowestPosition()Returns the value of thelowestPositionrecord component.- Specified by:
lowestPositionin interfaceApplicationEntry- Returns:
- the value of the
lowestPositionrecord component
-
highestPosition
public long highestPosition()Returns the value of thehighestPositionrecord component.- Specified by:
highestPositionin interfaceApplicationEntry- Returns:
- the value of the
highestPositionrecord component
-
dataWriter
Returns the value of thedataWriterrecord component.- Specified by:
dataWriterin interfaceApplicationEntry- Returns:
- the value of the
dataWriterrecord component
-