public class LocalHistoryStorage extends AbstractStorage
AbstractStorage.AppenderStream, AbstractStorage.StorageDataOutput
Disposable.Parent
DATA_EXTENSION, INDEX_EXTENSION, LOG, myDataTable, myLock, myPool, myRecordsTable
Constructor and Description |
---|
LocalHistoryStorage(java.lang.String storageFilePath) |
LocalHistoryStorage(java.lang.String storageFilePath,
PagePool pool) |
Modifier and Type | Method and Description |
---|---|
int |
createNextRecord() |
protected AbstractRecordsTable |
createRecordsTable(PagePool pool,
java.io.File recordsFile) |
void |
deleteRecordsUpTo(int idInclusively) |
int |
getFirstRecord() |
long |
getFSTimestamp() |
long |
getLastId() |
int |
getLastRecord() |
int |
getNextRecord(int record) |
Pair<java.lang.Long,java.lang.Integer> |
getOffsetAndSize(int id) |
int |
getPrevRecord(int record) |
long |
getTimestamp(int record) |
void |
setFSTimestamp(long timestamp) |
void |
setLastId(long lastId) |
appendBytes, appendStream, checkSanity, createRecordIdIterator, deleteFiles, dispose, doDeleteRecord, flushSome, force, getLiveRecordsCount, getVersion, isDirty, readBytes, readStream, replaceBytes, setVersion, writeBytes, writeStream, writeStream
public LocalHistoryStorage(java.lang.String storageFilePath) throws java.io.IOException
java.io.IOException
public LocalHistoryStorage(java.lang.String storageFilePath, PagePool pool) throws java.io.IOException
java.io.IOException
protected AbstractRecordsTable createRecordsTable(PagePool pool, java.io.File recordsFile) throws java.io.IOException
createRecordsTable
in class AbstractStorage
java.io.IOException
public long getFSTimestamp()
public void setFSTimestamp(long timestamp)
public long getLastId()
public void setLastId(long lastId)
public int getFirstRecord()
public int getLastRecord()
public int getPrevRecord(int record)
public int getNextRecord(int record)
public long getTimestamp(int record)
public Pair<java.lang.Long,java.lang.Integer> getOffsetAndSize(int id)
public int createNextRecord() throws java.io.IOException
java.io.IOException
public void deleteRecordsUpTo(int idInclusively) throws java.io.IOException
java.io.IOException