Package io.datarouter.bytes.blockfile
Record Class Blockfile<T>
java.lang.Object
java.lang.Record
io.datarouter.bytes.blockfile.Blockfile<T>
public record Blockfile<T>(BlockfileStorage storage, BlockfileCompressors registeredCompressors, BlockfileChecksummers registeredChecksummers)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionBlockfile(BlockfileStorage storage, BlockfileCompressors registeredCompressors, BlockfileChecksummers registeredChecksummers) Creates an instance of aBlockfilerecord 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.newMetadataReaderBuilder(String pathAndFile) newReaderBuilder(BlockfileMetadataReader<T> metadataReader, Function<BlockfileReader<T>, Function<byte[], T>> decoderExtractor) newReaderBuilderKnownFileLength(String pathAndFile, Function<BlockfileReader<T>, Function<byte[], T>> decoderExtractor, long knownFileLength) newWriterBuilder(String name, Function<T, byte[]> encoder) Returns the value of theregisteredChecksummersrecord component.Returns the value of theregisteredCompressorsrecord component.storage()Returns the value of thestoragerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Blockfile
public Blockfile(BlockfileStorage storage, BlockfileCompressors registeredCompressors, BlockfileChecksummers registeredChecksummers) Creates an instance of aBlockfilerecord class.- Parameters:
storage- the value for thestoragerecord componentregisteredCompressors- the value for theregisteredCompressorsrecord componentregisteredChecksummers- the value for theregisteredChecksummersrecord component
-
-
Method Details
-
newWriterBuilder
-
newMetadataReaderBuilder
-
newReaderBuilder
public BlockfileReaderBuilder<T> newReaderBuilder(BlockfileMetadataReader<T> metadataReader, Function<BlockfileReader<T>, Function<byte[], T>> decoderExtractor) -
newReaderBuilderKnownFileLength
public BlockfileReaderBuilder<T> newReaderBuilderKnownFileLength(String pathAndFile, Function<BlockfileReader<T>, Function<byte[], T>> decoderExtractor, long knownFileLength) -
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. All components in this record class are compared withObjects::equals(Object,Object). -
storage
Returns the value of thestoragerecord component.- Returns:
- the value of the
storagerecord component
-
registeredCompressors
Returns the value of theregisteredCompressorsrecord component.- Returns:
- the value of the
registeredCompressorsrecord component
-
registeredChecksummers
Returns the value of theregisteredChecksummersrecord component.- Returns:
- the value of the
registeredChecksummersrecord component
-