- java.lang.Object
-
- org.ojalgo.netio.SegmentedFile.Builder
-
- Enclosing class:
- SegmentedFile
public static final class SegmentedFile.Builder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static longkprivate longmyBytesPerSegmentprivate intmyDelimiterprivate java.io.FilemyFileprivate intmyParallelism
-
Constructor Summary
Constructors Constructor Description Builder(java.io.File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SegmentedFilebuild()SegmentedFile.Builderdelimiter(byte delimiter)The delimiter is used to determine where to split the file into segments.SegmentedFile.Builderparallelism(int parallelism)SegmentedFile.Builderparallelism(java.util.function.IntSupplier parallelism)The expected number of threads that will be used to process the file.SegmentedFile.BuildersegmentBytes(long bytesPerSegment)The target (max) size (bytes) of each segment.SegmentedFile.BuildersegmentKiloBytes(long kiloBytesPerSegment)SegmentedFile.BuildersegmentMegaBytes(long megaBytesPerSegment)
-
-
-
Field Detail
-
k
private static final long k
- See Also:
- Constant Field Values
-
myBytesPerSegment
private long myBytesPerSegment
-
myDelimiter
private int myDelimiter
-
myFile
private final java.io.File myFile
-
myParallelism
private int myParallelism
-
-
Method Detail
-
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(IntSupplier)
-
parallelism
public SegmentedFile.Builder parallelism(java.util.function.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:
segmentBytes(long)
-
segmentMegaBytes
public SegmentedFile.Builder segmentMegaBytes(long megaBytesPerSegment)
- See Also:
segmentBytes(long)
-
-