public abstract class AbstractStorage extends java.lang.Object implements Disposable, Forceable
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractStorage.AppenderStream |
static class |
AbstractStorage.StorageDataOutput |
Disposable.Parent| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DATA_EXTENSION |
static java.lang.String |
INDEX_EXTENSION |
protected static Logger |
LOG |
protected com.intellij.util.io.storage.DataTable |
myDataTable |
protected java.lang.Object |
myLock |
protected PagePool |
myPool |
protected AbstractRecordsTable |
myRecordsTable |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractStorage(java.lang.String storageFilePath) |
protected |
AbstractStorage(java.lang.String storageFilePath,
CapacityAllocationPolicy capacityAllocationPolicy) |
protected |
AbstractStorage(java.lang.String storageFilePath,
PagePool pool) |
protected |
AbstractStorage(java.lang.String storageFilePath,
PagePool pool,
CapacityAllocationPolicy capacityAllocationPolicy) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendBytes(int record,
ByteArraySequence bytes) |
AbstractStorage.AppenderStream |
appendStream(int record) |
void |
checkSanity(int record) |
RecordIdIterator |
createRecordIdIterator() |
protected abstract AbstractRecordsTable |
createRecordsTable(PagePool pool,
java.io.File recordsFile) |
static boolean |
deleteFiles(java.lang.String storageFilePath) |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
protected void |
doDeleteRecord(int record) |
boolean |
flushSome() |
void |
force() |
int |
getLiveRecordsCount() |
int |
getVersion() |
boolean |
isDirty() |
protected byte[] |
readBytes(int record) |
java.io.DataInputStream |
readStream(int record) |
void |
replaceBytes(int record,
int offset,
ByteArraySequence bytes) |
void |
setVersion(int expectedVersion) |
void |
writeBytes(int record,
ByteArraySequence bytes,
boolean fixedSize) |
AbstractStorage.StorageDataOutput |
writeStream(int record) |
AbstractStorage.StorageDataOutput |
writeStream(int record,
boolean fixedSize) |
protected static final Logger LOG
public static final java.lang.String INDEX_EXTENSION
public static final java.lang.String DATA_EXTENSION
protected final java.lang.Object myLock
protected AbstractRecordsTable myRecordsTable
protected com.intellij.util.io.storage.DataTable myDataTable
protected PagePool myPool
protected AbstractStorage(java.lang.String storageFilePath)
throws java.io.IOException
java.io.IOExceptionprotected AbstractStorage(java.lang.String storageFilePath,
PagePool pool)
throws java.io.IOException
java.io.IOExceptionprotected AbstractStorage(java.lang.String storageFilePath,
CapacityAllocationPolicy capacityAllocationPolicy)
throws java.io.IOException
java.io.IOExceptionprotected AbstractStorage(java.lang.String storageFilePath,
PagePool pool,
CapacityAllocationPolicy capacityAllocationPolicy)
throws java.io.IOException
java.io.IOExceptionpublic static boolean deleteFiles(java.lang.String storageFilePath)
protected abstract AbstractRecordsTable createRecordsTable(PagePool pool, java.io.File recordsFile) throws java.io.IOException
java.io.IOExceptionpublic int getVersion()
public void setVersion(int expectedVersion)
public boolean flushSome()
public int getLiveRecordsCount()
throws java.io.IOException
java.io.IOExceptionpublic RecordIdIterator createRecordIdIterator() throws java.io.IOException
java.io.IOExceptionpublic AbstractStorage.StorageDataOutput writeStream(int record)
public AbstractStorage.StorageDataOutput writeStream(int record, boolean fixedSize)
public AbstractStorage.AppenderStream appendStream(int record)
public java.io.DataInputStream readStream(int record)
throws java.io.IOException
java.io.IOExceptionprotected byte[] readBytes(int record)
throws java.io.IOException
java.io.IOExceptionprotected void appendBytes(int record,
ByteArraySequence bytes)
throws java.io.IOException
java.io.IOExceptionpublic void writeBytes(int record,
ByteArraySequence bytes,
boolean fixedSize)
throws java.io.IOException
java.io.IOExceptionprotected void doDeleteRecord(int record)
throws java.io.IOException
java.io.IOExceptionpublic void dispose()
Disposabledispose in interface Disposablepublic void checkSanity(int record)
public void replaceBytes(int record,
int offset,
ByteArraySequence bytes)
throws java.io.IOException
java.io.IOException