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 |
---|---|
long |
length |
long |
onDiskLength |
java.lang.String |
path |
Modifier | Constructor and Description |
---|---|
protected |
SegmentedFile(SegmentedFile.Cleanup cleanup,
java.lang.String path,
long length,
long onDiskLength) |
|
SegmentedFile(SegmentedFile copy) |
Modifier and Type | Method and Description |
---|---|
RandomAccessReader |
createReader() |
RandomAccessReader |
createThrottledReader(com.google.common.util.concurrent.RateLimiter limiter) |
void |
dropPageCache(long before) |
static SegmentedFile.Builder |
getBuilder(Config.DiskAccessMode mode) |
static SegmentedFile.Builder |
getCompressedBuilder() |
static SegmentedFile.Builder |
getCompressedBuilder(CompressedSequentialWriter writer) |
FileDataInput |
getSegment(long position) |
java.util.Iterator<FileDataInput> |
iterator(long position) |
abstract SegmentedFile |
sharedCopy() |
java.lang.String |
toString() |
close, isCleanedUp
public final java.lang.String path
public final long length
public final long onDiskLength
protected SegmentedFile(SegmentedFile.Cleanup cleanup, java.lang.String path, long length, long onDiskLength)
public SegmentedFile(SegmentedFile copy)
public abstract SegmentedFile sharedCopy()
public RandomAccessReader createReader()
public RandomAccessReader createThrottledReader(com.google.common.util.concurrent.RateLimiter limiter)
public FileDataInput getSegment(long position)
public void dropPageCache(long before)
public static SegmentedFile.Builder getBuilder(Config.DiskAccessMode mode)
public static SegmentedFile.Builder getCompressedBuilder()
public static SegmentedFile.Builder getCompressedBuilder(CompressedSequentialWriter writer)
public java.util.Iterator<FileDataInput> iterator(long position)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2016 The Apache Software Foundation