Record Class BlockfileReader.BlockfileReaderConfig<T>

java.lang.Object
java.lang.Record
io.datarouter.bytes.blockfile.read.BlockfileReader.BlockfileReaderConfig<T>
Enclosing class:
BlockfileReader<T>

public static record BlockfileReader.BlockfileReaderConfig<T>(BlockfileStorage storage, Function<BlockfileReader<T>,Function<byte[],T>> decoderExtractor, BlockfileHeader.BlockfileHeaderCodec headerCodec, io.datarouter.scanner.Threads readThreads, ByteLength readChunkSize, int decodeBatchSize, io.datarouter.scanner.Threads decodeThreads, boolean validateChecksums, Optional<Long> knownFileLength) extends Record
  • Constructor Details

    • BlockfileReaderConfig

      public BlockfileReaderConfig(BlockfileStorage storage, Function<BlockfileReader<T>,Function<byte[],T>> decoderExtractor, BlockfileHeader.BlockfileHeaderCodec headerCodec, io.datarouter.scanner.Threads readThreads, ByteLength readChunkSize, int decodeBatchSize, io.datarouter.scanner.Threads decodeThreads, boolean validateChecksums, Optional<Long> knownFileLength)
      Creates an instance of a BlockfileReaderConfig record class.
      Parameters:
      storage - the value for the storage record component
      decoderExtractor - the value for the decoderExtractor record component
      headerCodec - the value for the headerCodec record component
      readThreads - the value for the readThreads record component
      readChunkSize - the value for the readChunkSize record component
      decodeBatchSize - the value for the decodeBatchSize record component
      decodeThreads - the value for the decodeThreads record component
      validateChecksums - the value for the validateChecksums record component
      knownFileLength - the value for the knownFileLength record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • storage

      public BlockfileStorage storage()
      Returns the value of the storage record component.
      Returns:
      the value of the storage record component
    • decoderExtractor

      public Function<BlockfileReader<T>,Function<byte[],T>> decoderExtractor()
      Returns the value of the decoderExtractor record component.
      Returns:
      the value of the decoderExtractor record component
    • headerCodec

      Returns the value of the headerCodec record component.
      Returns:
      the value of the headerCodec record component
    • readThreads

      public io.datarouter.scanner.Threads readThreads()
      Returns the value of the readThreads record component.
      Returns:
      the value of the readThreads record component
    • readChunkSize

      public ByteLength readChunkSize()
      Returns the value of the readChunkSize record component.
      Returns:
      the value of the readChunkSize record component
    • decodeBatchSize

      public int decodeBatchSize()
      Returns the value of the decodeBatchSize record component.
      Returns:
      the value of the decodeBatchSize record component
    • decodeThreads

      public io.datarouter.scanner.Threads decodeThreads()
      Returns the value of the decodeThreads record component.
      Returns:
      the value of the decodeThreads record component
    • validateChecksums

      public boolean validateChecksums()
      Returns the value of the validateChecksums record component.
      Returns:
      the value of the validateChecksums record component
    • knownFileLength

      public Optional<Long> knownFileLength()
      Returns the value of the knownFileLength record component.
      Returns:
      the value of the knownFileLength record component