Record Class BlockfileSegment
java.lang.Object
java.lang.Record
io.datarouter.bytes.blockfile.io.storage.BlockfileSegment
-
Constructor Summary
ConstructorsConstructorDescriptionBlockfileSegment(String name, long from, byte[] bytes) Creates an instance of aBlockfileSegmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]bytes()Returns the value of thebytesrecord component.booleancontains(BlockfileLocation location) final booleanIndicates whether some other object is "equal to" this one.byte[]extractBytes(BlockfileLocation location) longfrom()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.longto()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BlockfileSegment
Creates an instance of aBlockfileSegmentrecord class.- Parameters:
name- the value for thenamerecord componentfrom- the value for thefromrecord componentbytes- the value for thebytesrecord component
-
-
Method Details
-
to
public long to() -
contains
-
extractBytes
-
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
from
public long from()Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
bytes
public byte[] bytes()Returns the value of thebytesrecord component.- Returns:
- the value of the
bytesrecord component
-