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 |
---|---|
ChannelProxy |
channel |
long |
length |
long |
onDiskLength |
Modifier | Constructor and Description |
---|---|
protected |
SegmentedFile(SegmentedFile.Cleanup cleanup,
ChannelProxy channel,
long length,
long onDiskLength) |
|
SegmentedFile(SegmentedFile copy) |
Modifier and Type | Method and Description |
---|---|
long[] |
copyReadableBounds()
Retrieve the readable bounds if any so they can be cloned into other files such
as when downsampling an index summary.
|
RandomAccessReader |
createReader() |
RandomAccessReader |
createThrottledReader(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) |
FileDataInput |
getSegment(long position) |
java.util.Iterator<FileDataInput> |
iterator(long position) |
java.lang.String |
path() |
abstract SegmentedFile |
sharedCopy() |
java.lang.String |
toString() |
close, close, isCleanedUp
public final ChannelProxy channel
public final long length
public final long onDiskLength
protected SegmentedFile(SegmentedFile.Cleanup cleanup, ChannelProxy channel, long length, long onDiskLength)
public SegmentedFile(SegmentedFile copy)
public java.lang.String path()
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, boolean compressed)
public static SegmentedFile.Builder getCompressedBuilder(CompressedSequentialWriter writer)
public java.util.Iterator<FileDataInput> iterator(long position)
public long[] copyReadableBounds()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2019 The Apache Software Foundation