Class SegmentedFile.Builder

java.lang.Object
org.ojalgo.netio.SegmentedFile.Builder
Enclosing class:
SegmentedFile

public static final class SegmentedFile.Builder extends Object
  • Field Details

    • k

      private static final long k
      See Also:
    • myBytesPerSegment

      private long myBytesPerSegment
    • myDelimiter

      private int myDelimiter
    • myFile

      private final File myFile
    • myParallelism

      private int myParallelism
  • Constructor Details

    • Builder

      Builder(File file)
  • Method Details

    • build

      public SegmentedFile build()
    • delimiter

      public SegmentedFile.Builder delimiter(byte delimiter)
      The delimiter is used to determine where to split the file into segments. The default value is '\n' (newline).
    • parallelism

      public SegmentedFile.Builder parallelism(int parallelism)
      See Also:
    • parallelism

      public SegmentedFile.Builder parallelism(IntSupplier parallelism)
      The expected number of threads that will be used to process the file. The number of segments will a multiple of this number. The default value is the number of CPU cores.
    • segmentBytes

      public SegmentedFile.Builder segmentBytes(long bytesPerSegment)
      The target (max) size (bytes) of each segment. The actual size will be less than or equal to this value. The last segment will be smaller than or equal to the other segments.
    • segmentKiloBytes

      public SegmentedFile.Builder segmentKiloBytes(long kiloBytesPerSegment)
      See Also:
    • segmentMegaBytes

      public SegmentedFile.Builder segmentMegaBytes(long megaBytesPerSegment)
      See Also: