public static class MmappedSegmentedFile.Builder extends SegmentedFile.Builder
Modifier and Type | Class and Description |
---|---|
static class |
MmappedSegmentedFile.Builder.Boundaries |
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
void |
addPotentialBoundary(long boundary)
Adds a position that would be a safe place for a segment boundary in the file.
|
long[] |
boundaries() |
SegmentedFile |
complete(ChannelProxy channel,
long overrideLength)
Called after all potential boundaries have been added to apply this Builder to a concrete file on disk.
|
void |
deserializeBounds(java.io.DataInput in) |
void |
serializeBounds(java.io.DataOutput out) |
close, close, complete, complete
public long[] boundaries()
public void addPotentialBoundary(long boundary)
SegmentedFile.Builder
addPotentialBoundary
in class SegmentedFile.Builder
boundary
- The absolute position of the potential boundary in the file.public SegmentedFile complete(ChannelProxy channel, long overrideLength)
SegmentedFile.Builder
complete
in class SegmentedFile.Builder
channel
- The channel to the file on disk.public void serializeBounds(java.io.DataOutput out) throws java.io.IOException
serializeBounds
in class SegmentedFile.Builder
java.io.IOException
public void deserializeBounds(java.io.DataInput in) throws java.io.IOException
deserializeBounds
in class SegmentedFile.Builder
java.io.IOException
Copyright © 2018 The Apache Software Foundation