public class RefCountingStorage extends AbstractStorage
AbstractStorage.AppenderStream, AbstractStorage.StorageDataOutputDisposable.ParentDATA_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, writeStreampublic RefCountingStorage(java.lang.String path)
throws java.io.IOException
java.io.IOExceptionpublic RefCountingStorage(java.lang.String path,
CapacityAllocationPolicy capacityAllocationPolicy)
throws java.io.IOException
java.io.IOExceptionpublic RefCountingStorage(java.lang.String path,
CapacityAllocationPolicy capacityAllocationPolicy,
boolean doNotZipCaches)
throws java.io.IOException
java.io.IOExceptionprotected java.util.concurrent.ExecutorService createExecutor()
public java.io.DataInputStream readStream(int record)
throws java.io.IOException
readStream in class AbstractStoragejava.io.IOExceptionprotected byte[] readBytes(int record)
throws java.io.IOException
readBytes in class AbstractStoragejava.io.IOExceptionprotected void appendBytes(int record,
ByteArraySequence bytes)
throws java.io.IOException
appendBytes in class AbstractStoragejava.io.IOExceptionpublic void writeBytes(int record,
ByteArraySequence bytes,
boolean fixedSize)
throws java.io.IOException
writeBytes in class AbstractStoragejava.io.IOExceptionprotected AbstractRecordsTable createRecordsTable(PagePool pool, java.io.File recordsFile) throws java.io.IOException
createRecordsTable in class AbstractStoragejava.io.IOExceptionpublic int acquireNewRecord()
throws java.io.IOException
java.io.IOExceptionpublic int createNewRecord()
throws java.io.IOException
java.io.IOExceptionpublic void acquireRecord(int record)
public void releaseRecord(int record)
throws java.io.IOException
java.io.IOExceptionpublic void releaseRecord(int record,
boolean completely)
throws java.io.IOException
java.io.IOExceptionpublic int getRefCount(int record)
public void force()
force in interface Forceableforce in class AbstractStoragepublic boolean isDirty()
isDirty in interface ForceableisDirty in class AbstractStoragepublic boolean flushSome()
flushSome in class AbstractStoragepublic void dispose()
Disposabledispose in interface Disposabledispose in class AbstractStoragepublic void checkSanity(int record)
checkSanity in class AbstractStorage