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.
|
void |
close() |
java.lang.Throwable |
close(java.lang.Throwable accumulate) |
protected abstract SegmentedFile |
complete(ChannelProxy channel,
long overrideLength)
Called after all potential boundaries have been added to apply this Builder to a concrete file on disk.
|
SegmentedFile |
complete(java.lang.String path) |
SegmentedFile |
complete(java.lang.String path,
long overrideLength) |
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, long overrideLength)
channel
- The channel to the file on disk.public SegmentedFile complete(java.lang.String path)
public SegmentedFile complete(java.lang.String path, long overrideLength)
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 © 2016 The Apache Software Foundation