class QSequenceLineFileSystemCacheSegments
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.io.RandomAccessFile |
file |
private java.io.File |
filePath |
private int |
maximumEntriesPerSegment |
private int |
maximumSegmentsInMemory |
private java.util.List |
memorySegments |
private java.util.List |
segments |
private QSequenceLineTempDirectoryFactory |
tempDirectoryFactory |
| Constructor and Description |
|---|
QSequenceLineFileSystemCacheSegments(QSequenceLineTempDirectoryFactory tempDirectoryFactory,
int maximumBytesInMemory,
int segmentBytesSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
private java.io.RandomAccessFile |
getFile() |
long |
getFrom(int index) |
int |
getHash(int index) |
int |
getLength(int index) |
private QSequenceLineFileSystemCacheSegment |
getSegment(int segmentIndex) |
private void |
maybeUnloadSegments() |
void |
setFromLengthHash(int index,
long from,
int length,
int hash) |
private final QSequenceLineTempDirectoryFactory tempDirectoryFactory
private final int maximumEntriesPerSegment
private final int maximumSegmentsInMemory
private final java.util.List segments
private final java.util.List memorySegments
private java.io.File filePath
private java.io.RandomAccessFile file
public QSequenceLineFileSystemCacheSegments(QSequenceLineTempDirectoryFactory tempDirectoryFactory, int maximumBytesInMemory, int segmentBytesSize)
public long getFrom(int index)
throws java.io.IOException
java.io.IOExceptionpublic int getLength(int index)
throws java.io.IOException
java.io.IOExceptionpublic int getHash(int index)
throws java.io.IOException
java.io.IOExceptionpublic void setFromLengthHash(int index,
long from,
int length,
int hash)
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOExceptionprivate QSequenceLineFileSystemCacheSegment getSegment(int segmentIndex) throws java.io.IOException
java.io.IOExceptionprivate void maybeUnloadSegments()
throws java.io.IOException
java.io.IOExceptionprivate java.io.RandomAccessFile getFile()
throws java.io.IOException
java.io.IOException