@NotStorableClass public class HeaderPage extends AbstractPageRecord implements IPageRecordable
heapElementManager
fileForStorable, justCreated, logger, numberOfByteReadWrote, positionInFile, valueChangedToSave
Constructor and Description |
---|
HeaderPage(IHeapElementManager heapElementManager) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
initial state:no value to save since not read and not write
|
void |
decrementNumberOfDataRecord() |
void |
decrementNumberOfFreeRecord() |
int |
getByteSize() |
long |
getFileSizeAsNumberOfPage() |
long |
getFirstFreeBlock(int blockBits) |
long |
getFirstLeafPagePosition() |
long |
getFreeDataBlockPosition(int bits) |
int |
getInParentIndex() |
long |
getLastRecordPositionInFile() |
long |
getNewDataRecordIdentifier() |
long |
getNextFreeDataRecordIdentifier() |
int |
getNumberOfDataRecord() |
int |
getNumberOfFreeRecord() |
int |
getNumberOfPage()
the number of pages take is fix
|
long |
getPageNumberOfFirstFreePage() |
PageRecord |
getPageRecord() |
IPageRecordable |
getParentPage() |
long |
getPreviousRecordPositionInFile() |
int |
getRecordSize()
get the record size
|
EnumRecordType |
getRecordType() |
long |
getRootPagePosition() |
void |
incrementNumberOfDataRecord() |
void |
incrementNumberOfFreeRecord() |
void |
incrementNumberOfFreeRecord(int increment) |
protected void |
marshallImpl()
marshaling implementation for write
#crc32 is set to zero |
void |
setFileSizeAsNumberOfPage(long fileSizeAsNumberOfPage) |
void |
setFirstFreeBlock(long firstFreeBlockPosition,
int blockBits) |
void |
setFirstLeafPagePosition(long firstLeafPagePosition) |
void |
setFreeDataBlockPosition(int bits,
long freeDataBlockPosition) |
void |
setLastRecordPositionInFile(long lastRecordPositionInFile) |
void |
setNextFreeDataRecordIdentifier(long value) |
void |
setNumberOfFreeRecord(int numberOfFreeRecord) |
void |
setPageNumberOfFirstFreePage(long pageNumberOfFirstFreePage) |
void |
setPageRecord(IPageRecord pageRecord) |
void |
setParentPage(IPageRecordable parentPage,
int inParentIndex) |
void |
setRootPagePosition(long rootPagePosition) |
protected int |
toMarshallSize() |
protected void |
unmarshallImpl()
Unmarshalling implementation for read
#crc32 is set to zero |
void |
updateByteSize() |
protected void |
valueChangedAction() |
readKey, readRecordType, writeByteRecordType, writeKey
equals, getPositionInFile, hashCode, isJustCreated, isValueChangedToSave, readAndCheckCrc32, readBoolean, readByte, readBytes, readBytes, readFileAppendToIoBuffer, readFileToIoBuffer, readFromFile, readInteger, readLong, setValueIsChangedValueToSave, setValueIsNotChanged, toString, writeBoolean, writeByte, writeBytes, writeCrc32, writeInteger, writeLong, writeToFile, writeToFileGetWrited
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
setValueIsChangedValueToSave, setValueIsNotChanged
public HeaderPage(IHeapElementManager heapElementManager)
protected void valueChangedAction() throws HeapException
valueChangedAction
in class AbstractFileStorable
HeapException
public long getFileSizeAsNumberOfPage()
public void setFileSizeAsNumberOfPage(long fileSizeAsNumberOfPage) throws HeapException
HeapException
public long getPageNumberOfFirstFreePage()
public void setPageNumberOfFirstFreePage(long pageNumberOfFirstFreePage) throws HeapException
HeapException
public long getRootPagePosition()
public void setRootPagePosition(long rootPagePosition) throws HeapException
HeapException
public void setFirstFreeBlock(long firstFreeBlockPosition, int blockBits) throws HeapException
HeapException
public long getFirstFreeBlock(int blockBits)
public long getFirstLeafPagePosition()
public void setFirstLeafPagePosition(long firstLeafPagePosition)
public void clear()
IFileStorable
clear
in interface IFileStorable
clear
in class AbstractFileStorable
public int getNumberOfPage()
IPageRecordable
getNumberOfPage
in interface IPageRecordable
public long getPreviousRecordPositionInFile() throws HeapException
getPreviousRecordPositionInFile
in interface IFileStorable
HeapException
public EnumRecordType getRecordType()
getRecordType
in interface IPageRecordable
public int getRecordSize() throws HeapException
IFileStorable
getRecordSize
in interface IFileStorable
HeapException
protected int toMarshallSize() throws HeapException
toMarshallSize
in class AbstractFileStorable
HeapException
protected void marshallImpl() throws HeapException
AbstractFileStorable
#crc32
is set to zeromarshallImpl
in class AbstractFileStorable
HeapException
protected void unmarshallImpl() throws HeapException
AbstractFileStorable
#crc32
is set to zerounmarshallImpl
in class AbstractFileStorable
HeapException
public void updateByteSize()
updateByteSize
in interface IPageRecordable
public int getByteSize()
getByteSize
in interface IPageRecordable
public void setPageRecord(IPageRecord pageRecord) throws HeapException
setPageRecord
in interface IPageRecordable
HeapException
public PageRecord getPageRecord() throws HeapException
getPageRecord
in interface IPageRecordable
HeapException
public long getNextFreeDataRecordIdentifier()
public void setNextFreeDataRecordIdentifier(long value) throws HeapException
HeapException
public long getNewDataRecordIdentifier() throws HeapException
HeapException
public long getFreeDataBlockPosition(int bits)
public void setFreeDataBlockPosition(int bits, long freeDataBlockPosition) throws HeapException
HeapException
public void setParentPage(IPageRecordable parentPage, int inParentIndex) throws HeapException
setParentPage
in interface IPageRecordable
HeapException
public IPageRecordable getParentPage() throws HeapException
getParentPage
in interface IPageRecordable
HeapException
public int getInParentIndex() throws HeapException
getInParentIndex
in interface IPageRecordable
HeapException
public void setLastRecordPositionInFile(long lastRecordPositionInFile)
public long getLastRecordPositionInFile()
public void incrementNumberOfDataRecord() throws HeapException
HeapException
public void decrementNumberOfDataRecord() throws HeapException
HeapException
public int getNumberOfDataRecord()
public int getNumberOfFreeRecord()
public void setNumberOfFreeRecord(int numberOfFreeRecord)
public void incrementNumberOfFreeRecord()
public void decrementNumberOfFreeRecord()
public void incrementNumberOfFreeRecord(int increment)
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.