public class ZVerseBackendState extends AbstractOpenFileState
The GNU Lesser General Public License for details.
Modifier and Type | Field and Description |
---|---|
private long |
lastBlockNum |
private Testament |
lastTestament |
private byte[] |
lastUncompressed |
private static org.slf4j.Logger |
LOGGER
The log stream
|
private RandomAccessFile |
ntCompRaf |
private RandomAccessFile |
ntIdxRaf |
private RandomAccessFile |
ntTextRaf |
private RandomAccessFile |
otCompRaf
The compressed random access files
|
private RandomAccessFile |
otIdxRaf
The index random access files
|
private RandomAccessFile |
otTextRaf
The data random access files
|
private static String |
SUFFIX_COMP |
private static String |
SUFFIX_INDEX |
private static String |
SUFFIX_PART1 |
private static String |
SUFFIX_TEXT |
Constructor and Description |
---|
ZVerseBackendState(BookMetaData bookMetaData,
BlockType blockType)
This is default package access for forcing the use of the
OpenFileStateManager to manage the creation.
|
Modifier and Type | Method and Description |
---|---|
RandomAccessFile |
getCompRaf(Testament testament)
Get the compression file for the given testament.
|
RandomAccessFile |
getIdxRaf(Testament testament)
Get the index file for the given testament.
|
long |
getLastBlockNum() |
Testament |
getLastTestament() |
byte[] |
getLastUncompressed() |
RandomAccessFile |
getTextRaf(Testament testament)
Get the text file for the given testament.
|
void |
releaseResources() |
void |
setLastBlockNum(long lastBlockNum) |
void |
setLastTestament(Testament lastTestament) |
void |
setLastUncompressed(byte[] lastUncompressed) |
close, getBookMetaData, getLastAccess, setLastAccess
private static final String SUFFIX_COMP
private static final String SUFFIX_INDEX
private static final String SUFFIX_PART1
private static final String SUFFIX_TEXT
private RandomAccessFile otCompRaf
private RandomAccessFile ntCompRaf
private RandomAccessFile otTextRaf
private RandomAccessFile ntTextRaf
private RandomAccessFile otIdxRaf
private RandomAccessFile ntIdxRaf
private Testament lastTestament
private long lastBlockNum
private byte[] lastUncompressed
private static final org.slf4j.Logger LOGGER
ZVerseBackendState(BookMetaData bookMetaData, BlockType blockType) throws BookException
bookMetaData
- the appropriate metadata for the bookBookException
public void releaseResources()
public RandomAccessFile getCompRaf(Testament testament)
testament
- the testament for the indexpublic RandomAccessFile getTextRaf(Testament testament)
testament
- the testament for the indexpublic RandomAccessFile getIdxRaf(Testament testament)
testament
- the testament for the indexpublic Testament getLastTestament()
public long getLastBlockNum()
public byte[] getLastUncompressed()
public void setLastTestament(Testament lastTestament)
lastTestament
- the lastTestament to setpublic void setLastBlockNum(long lastBlockNum)
lastBlockNum
- the lastBlockNum to setpublic void setLastUncompressed(byte[] lastUncompressed)
lastUncompressed
- the lastUncompressed to set