public abstract class SegmentedFile extends SharedCloseableImpl
Modifier and Type | Class and Description |
---|---|
static class |
SegmentedFile.Builder
Collects potential segmentation points in an underlying file, and builds a SegmentedFile to represent it.
|
protected static class |
SegmentedFile.Cleanup |
Modifier and Type | Field and Description |
---|---|
int |
bufferSize |
ChannelProxy |
channel |
long |
length |
long |
onDiskLength |
Modifier | Constructor and Description |
---|---|
protected |
SegmentedFile(SegmentedFile.Cleanup cleanup,
ChannelProxy channel,
int bufferSize,
long length,
long onDiskLength) |
protected |
SegmentedFile(SegmentedFile copy) |
Modifier and Type | Method and Description |
---|---|
RandomAccessReader |
createReader() |
FileDataInput |
createReader(long position) |
RandomAccessReader |
createReader(com.google.common.util.concurrent.RateLimiter limiter) |
void |
dropPageCache(long before) |
static SegmentedFile.Builder |
getBuilder(Config.DiskAccessMode mode,
boolean compressed) |
static SegmentedFile.Builder |
getCompressedBuilder(CompressedSequentialWriter writer) |
java.lang.String |
path() |
abstract SegmentedFile |
sharedCopy() |
java.lang.String |
toString() |
addTo, close, close, isCleanedUp
public final ChannelProxy channel
public final int bufferSize
public final long length
public final long onDiskLength
protected SegmentedFile(SegmentedFile.Cleanup cleanup, ChannelProxy channel, int bufferSize, long length, long onDiskLength)
protected SegmentedFile(SegmentedFile copy)
public java.lang.String path()
public abstract SegmentedFile sharedCopy()
public RandomAccessReader createReader()
public RandomAccessReader createReader(com.google.common.util.concurrent.RateLimiter limiter)
public FileDataInput createReader(long position)
public void dropPageCache(long before)
public static SegmentedFile.Builder getBuilder(Config.DiskAccessMode mode, boolean compressed)
public static SegmentedFile.Builder getCompressedBuilder(CompressedSequentialWriter writer)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2015 The Apache Software Foundation