Record Class SequencedBatch
java.lang.Object
java.lang.Record
io.camunda.zeebe.logstreams.impl.log.SequencedBatch
- All Implemented Interfaces:
BufferWriter
public record SequencedBatch(long timestamp, long firstPosition, long sourcePosition, List<LogAppendEntry> entries, int length)
extends Record
implements BufferWriter
-
Constructor Summary
ConstructorsConstructorDescriptionSequencedBatch(long timestamp, long firstPosition, long sourcePosition, List<LogAppendEntry> entries) SequencedBatch(long timestamp, long firstPosition, long sourcePosition, List<LogAppendEntry> entries, int length) Creates an instance of aSequencedBatchrecord class. -
Method Summary
Modifier and TypeMethodDescriptionentries()Returns the value of theentriesrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of thefirstPositionrecord component.intfinal inthashCode()Returns a hash code value for this object.intlength()Returns the value of thelengthrecord component.longReturns the value of thesourcePositionrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.voidwrite(org.agrona.MutableDirectBuffer buffer, int offset)
-
Constructor Details
-
SequencedBatch
public SequencedBatch(long timestamp, long firstPosition, long sourcePosition, List<LogAppendEntry> entries) -
SequencedBatch
public SequencedBatch(long timestamp, long firstPosition, long sourcePosition, List<LogAppendEntry> entries, int length) Creates an instance of aSequencedBatchrecord class.- Parameters:
timestamp- the value for thetimestamprecord componentfirstPosition- the value for thefirstPositionrecord componentsourcePosition- the value for thesourcePositionrecord componententries- the value for theentriesrecord componentlength- the value for thelengthrecord component
-
-
Method Details
-
getLength
public int getLength()- Specified by:
getLengthin interfaceBufferWriter
-
write
public void write(org.agrona.MutableDirectBuffer buffer, int offset) - Specified by:
writein interfaceBufferWriter
-
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 '=='. -
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
firstPosition
public long firstPosition()Returns the value of thefirstPositionrecord component.- Returns:
- the value of the
firstPositionrecord component
-
sourcePosition
public long sourcePosition()Returns the value of thesourcePositionrecord component.- Returns:
- the value of the
sourcePositionrecord component
-
entries
Returns the value of theentriesrecord component.- Returns:
- the value of the
entriesrecord component
-
length
public int length()Returns the value of thelengthrecord component.- Returns:
- the value of the
lengthrecord component
-