public abstract static class SegmentedFile.Builder
extends java.lang.Object
implements java.lang.AutoCloseable
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addPotentialBoundary(long boundary)
Adds a position that would be a safe place for a segment boundary in the file.
|
SegmentedFile |
buildData(Descriptor desc,
StatsMetadata stats) |
SegmentedFile |
buildData(Descriptor desc,
StatsMetadata stats,
IndexSummaryBuilder.ReadableBoundary boundary) |
SegmentedFile |
buildIndex(Descriptor desc,
IndexSummary indexSummary) |
SegmentedFile |
buildIndex(Descriptor desc,
IndexSummary indexSummary,
IndexSummaryBuilder.ReadableBoundary boundary) |
void |
close() |
java.lang.Throwable |
close(java.lang.Throwable accumulate) |
protected abstract SegmentedFile |
complete(ChannelProxy channel,
int bufferSize,
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) |
public abstract void addPotentialBoundary(long boundary)
boundary
- The absolute position of the potential boundary in the file.protected abstract SegmentedFile complete(ChannelProxy channel, int bufferSize, long overrideLength)
channel
- The channel to the file on disk.public SegmentedFile buildData(Descriptor desc, StatsMetadata stats, IndexSummaryBuilder.ReadableBoundary boundary)
public SegmentedFile buildData(Descriptor desc, StatsMetadata stats)
public SegmentedFile buildIndex(Descriptor desc, IndexSummary indexSummary, IndexSummaryBuilder.ReadableBoundary boundary)
public SegmentedFile buildIndex(Descriptor desc, IndexSummary indexSummary)
public void serializeBounds(java.io.DataOutput out) throws java.io.IOException
java.io.IOException
public void deserializeBounds(java.io.DataInput in) throws java.io.IOException
java.io.IOException
public java.lang.Throwable close(java.lang.Throwable accumulate)
public void close()
close
in interface java.lang.AutoCloseable
Copyright © 2015 The Apache Software Foundation