public class RefCountingStorage extends AbstractStorage
AbstractStorage.AppenderStream, AbstractStorage.StorageDataOutput
Disposable.Parent
DATA_EXTENSION, INDEX_EXTENSION, LOG, myDataTable, myLock, myPool, myRecordsTable
Constructor and Description |
---|
RefCountingStorage(java.lang.String path) |
RefCountingStorage(java.lang.String path,
CapacityAllocationPolicy capacityAllocationPolicy) |
RefCountingStorage(java.lang.String path,
CapacityAllocationPolicy capacityAllocationPolicy,
boolean doNotZipCaches) |
Modifier and Type | Method and Description |
---|---|
int |
acquireNewRecord() |
void |
acquireRecord(int record) |
protected void |
appendBytes(int record,
ByteArraySequence bytes) |
void |
checkSanity(int record) |
protected java.util.concurrent.ExecutorService |
createExecutor() |
int |
createNewRecord() |
protected AbstractRecordsTable |
createRecordsTable(PagePool pool,
java.io.File recordsFile) |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
boolean |
flushSome() |
void |
force() |
int |
getRefCount(int record) |
boolean |
isDirty() |
protected byte[] |
readBytes(int record) |
java.io.DataInputStream |
readStream(int record) |
void |
releaseRecord(int record) |
void |
releaseRecord(int record,
boolean completely) |
void |
writeBytes(int record,
ByteArraySequence bytes,
boolean fixedSize) |
appendStream, createRecordIdIterator, deleteFiles, doDeleteRecord, getLiveRecordsCount, getVersion, replaceBytes, setVersion, writeStream, writeStream
public RefCountingStorage(java.lang.String path) throws java.io.IOException
java.io.IOException
public RefCountingStorage(java.lang.String path, CapacityAllocationPolicy capacityAllocationPolicy) throws java.io.IOException
java.io.IOException
public RefCountingStorage(java.lang.String path, CapacityAllocationPolicy capacityAllocationPolicy, boolean doNotZipCaches) throws java.io.IOException
java.io.IOException
protected java.util.concurrent.ExecutorService createExecutor()
public java.io.DataInputStream readStream(int record) throws java.io.IOException
readStream
in class AbstractStorage
java.io.IOException
protected byte[] readBytes(int record) throws java.io.IOException
readBytes
in class AbstractStorage
java.io.IOException
protected void appendBytes(int record, ByteArraySequence bytes) throws java.io.IOException
appendBytes
in class AbstractStorage
java.io.IOException
public void writeBytes(int record, ByteArraySequence bytes, boolean fixedSize) throws java.io.IOException
writeBytes
in class AbstractStorage
java.io.IOException
protected AbstractRecordsTable createRecordsTable(PagePool pool, java.io.File recordsFile) throws java.io.IOException
createRecordsTable
in class AbstractStorage
java.io.IOException
public int acquireNewRecord() throws java.io.IOException
java.io.IOException
public int createNewRecord() throws java.io.IOException
java.io.IOException
public void acquireRecord(int record)
public void releaseRecord(int record) throws java.io.IOException
java.io.IOException
public void releaseRecord(int record, boolean completely) throws java.io.IOException
java.io.IOException
public int getRefCount(int record)
public void force()
force
in interface Forceable
force
in class AbstractStorage
public boolean isDirty()
isDirty
in interface Forceable
isDirty
in class AbstractStorage
public boolean flushSome()
flushSome
in class AbstractStorage
public void dispose()
Disposable
dispose
in interface Disposable
dispose
in class AbstractStorage
public void checkSanity(int record)
checkSanity
in class AbstractStorage