Package de.regnis.q.sequence.line
Class QSequenceLineFileSystemCacheSegments
- java.lang.Object
-
- de.regnis.q.sequence.line.QSequenceLineFileSystemCacheSegments
-
class QSequenceLineFileSystemCacheSegments extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.RandomAccessFilefileprivate java.io.FilefilePathprivate intmaximumEntriesPerSegmentprivate intmaximumSegmentsInMemoryprivate java.util.ListmemorySegmentsprivate java.util.Listsegmentsprivate QSequenceLineTempDirectoryFactorytempDirectoryFactory
-
Constructor Summary
Constructors Constructor Description QSequenceLineFileSystemCacheSegments(QSequenceLineTempDirectoryFactory tempDirectoryFactory, int maximumBytesInMemory, int segmentBytesSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()private java.io.RandomAccessFilegetFile()longgetFrom(int index)intgetHash(int index)intgetLength(int index)private QSequenceLineFileSystemCacheSegmentgetSegment(int segmentIndex)private voidmaybeUnloadSegments()voidsetFromLengthHash(int index, long from, int length, int hash)
-
-
-
Field Detail
-
tempDirectoryFactory
private final QSequenceLineTempDirectoryFactory tempDirectoryFactory
-
maximumEntriesPerSegment
private final int maximumEntriesPerSegment
-
maximumSegmentsInMemory
private final int maximumSegmentsInMemory
-
segments
private final java.util.List segments
-
memorySegments
private final java.util.List memorySegments
-
filePath
private java.io.File filePath
-
file
private java.io.RandomAccessFile file
-
-
Constructor Detail
-
QSequenceLineFileSystemCacheSegments
public QSequenceLineFileSystemCacheSegments(QSequenceLineTempDirectoryFactory tempDirectoryFactory, int maximumBytesInMemory, int segmentBytesSize)
-
-
Method Detail
-
getFrom
public long getFrom(int index) throws java.io.IOException- Throws:
java.io.IOException
-
getLength
public int getLength(int index) throws java.io.IOException- Throws:
java.io.IOException
-
getHash
public int getHash(int index) throws java.io.IOException- Throws:
java.io.IOException
-
setFromLengthHash
public void setFromLengthHash(int index, long from, int length, int hash) throws java.io.IOException- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
getSegment
private QSequenceLineFileSystemCacheSegment getSegment(int segmentIndex) throws java.io.IOException
- Throws:
java.io.IOException
-
maybeUnloadSegments
private void maybeUnloadSegments() throws java.io.IOException- Throws:
java.io.IOException
-
getFile
private java.io.RandomAccessFile getFile() throws java.io.IOException- Throws:
java.io.IOException
-
-