public abstract class AbstractRecordsTable extends java.lang.Object implements Disposable, Forceable
Disposable.Parent
Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_HEADER_SIZE |
protected static int |
DEFAULT_RECORD_SIZE |
protected RandomAccessDataFile |
myStorage |
protected static int |
SPECIAL_NEGATIVE_SIZE_FOR_REMOVED_RECORD |
Constructor and Description |
---|
AbstractRecordsTable(java.io.File storageFilePath,
PagePool pool) |
Modifier and Type | Method and Description |
---|---|
int |
createNewRecord() |
RecordIdIterator |
createRecordIdIterator() |
void |
deleteRecord(int record) |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
boolean |
flushSome(int maxPages) |
void |
force() |
long |
getAddress(int record) |
int |
getCapacity(int record) |
protected int |
getHeaderSize() |
protected abstract int |
getImplVersion() |
int |
getLiveRecordsCount() |
protected int |
getOffset(int record,
int section) |
int |
getRecordsCount() |
protected abstract int |
getRecordSize() |
int |
getSize(int record) |
int |
getVersion() |
protected abstract byte[] |
getZeros() |
boolean |
isDirty() |
protected static boolean |
isSizeOfLiveRecord(int length) |
protected static boolean |
isSizeOfRemovedRecord(int length) |
void |
markDirty() |
void |
setAddress(int record,
long address) |
void |
setCapacity(int record,
int capacity) |
void |
setSize(int record,
int size) |
void |
setVersion(int expectedVersion) |
protected static final int DEFAULT_HEADER_SIZE
protected static final int DEFAULT_RECORD_SIZE
protected final RandomAccessDataFile myStorage
protected static final int SPECIAL_NEGATIVE_SIZE_FOR_REMOVED_RECORD
public AbstractRecordsTable(java.io.File storageFilePath, PagePool pool) throws java.io.IOException
java.io.IOException
protected int getHeaderSize()
protected abstract int getImplVersion()
protected abstract int getRecordSize()
protected abstract byte[] getZeros()
public int createNewRecord() throws java.io.IOException
java.io.IOException
public int getRecordsCount() throws java.io.IOException
java.io.IOException
public RecordIdIterator createRecordIdIterator() throws java.io.IOException
java.io.IOException
public int getLiveRecordsCount() throws java.io.IOException
java.io.IOException
public long getAddress(int record)
public void setAddress(int record, long address)
public int getSize(int record)
public void setSize(int record, int size)
public int getCapacity(int record)
public void setCapacity(int record, int capacity)
protected int getOffset(int record, int section)
public void deleteRecord(int record) throws java.io.IOException
java.io.IOException
public int getVersion()
public void setVersion(int expectedVersion)
public void dispose()
Disposable
dispose
in interface Disposable
public boolean flushSome(int maxPages)
public void markDirty()
protected static boolean isSizeOfRemovedRecord(int length)
protected static boolean isSizeOfLiveRecord(int length)