Record Class BlockfileChecksummer
java.lang.Object
java.lang.Record
io.datarouter.bytes.blockfile.encoding.checksum.BlockfileChecksummer
-
Constructor Summary
ConstructorsConstructorDescriptionBlockfileChecksummer(String encodedName, int numBytes, Supplier<Function<byte[], byte[]>> encoderSupplier) Creates an instance of aBlockfileChecksummerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic intbytesToLength(byte[] bytes) static StringbytesToName(byte[] bytes) Returns the value of theencodedNamerecord component.Returns the value of theencoderSupplierrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.byte[]byte[]Function<byte[], byte[]> intnumBytes()Returns the value of thenumBytesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BlockfileChecksummer
public BlockfileChecksummer(String encodedName, int numBytes, Supplier<Function<byte[], byte[]>> encoderSupplier) Creates an instance of aBlockfileChecksummerrecord class.- Parameters:
encodedName- the value for theencodedNamerecord componentnumBytes- the value for thenumBytesrecord componentencoderSupplier- the value for theencoderSupplierrecord component
-
-
Method Details
-
lengthToBytes
public byte[] lengthToBytes() -
bytesToLength
public static int bytesToLength(byte[] bytes) -
nameToBytes
public byte[] nameToBytes() -
bytesToName
-
newEncoder
-
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 '=='. -
encodedName
Returns the value of theencodedNamerecord component.- Returns:
- the value of the
encodedNamerecord component
-
numBytes
public int numBytes()Returns the value of thenumBytesrecord component.- Returns:
- the value of the
numBytesrecord component
-
encoderSupplier
-