Package org.ojalgo.netio
Class SegmentedFile.Builder
java.lang.Object
org.ojalgo.netio.SegmentedFile.Builder
- Enclosing class:
SegmentedFile
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
private long
private int
private final File
private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
delimiter
(byte delimiter) The delimiter is used to determine where to split the file into segments.parallelism
(int parallelism) parallelism
(IntSupplier parallelism) The expected number of threads that will be used to process the file.segmentBytes
(long bytesPerSegment) The target (max) size (bytes) of each segment.segmentKiloBytes
(long kiloBytesPerSegment) segmentMegaBytes
(long megaBytesPerSegment)
-
Field Details
-
k
private static final long k- See Also:
-
myBytesPerSegment
private long myBytesPerSegment -
myDelimiter
private int myDelimiter -
myFile
-
myParallelism
private int myParallelism
-
-
Constructor Details
-
Builder
Builder(File file)
-
-
Method Details
-
build
-
delimiter
The delimiter is used to determine where to split the file into segments. The default value is '\n' (newline). -
parallelism
- See Also:
-
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
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
- See Also:
-
segmentMegaBytes
- See Also:
-