@NotStorableClass public class LeafPage extends AbstractNodePage implements ILeafPage
Modifier and Type | Field and Description |
---|---|
static int |
HEAD_TAIL_SIZE |
static int |
MAX_NUMBER_OF_ENTRIES |
longKey
Constructor and Description |
---|
LeafPage(int numberOfKeyEntries,
boolean longKey) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(DataRecordIdentifier dataRecordIdentifier,
IDataBlock dataBlock) |
long |
getBlockPointer(int index) |
int |
getByteSize() |
long |
getDataBlockPosition(DataRecordIdentifier dataRecordIdentifier) |
DataRecordIdentifier |
getFirstKey() |
int |
getIndex() |
int |
getInParentIndex() |
DataRecordIdentifier |
getKey(int index) |
DataRecordIdentifier |
getLastKey() |
long |
getNext() |
int |
getNumberOfKeyEntries() |
int |
getNumberOfPage()
the number of pages take is fix
|
IPageRecordable |
getParentPage() |
EnumRecordType |
getRecordType() |
void |
remove(int index) |
void |
setDataBlock(int index,
IDataBlock dataBlock) |
void |
setEntry(int index,
long pagePointer,
DataRecordIdentifier key) |
void |
setNext(long next) |
void |
setParentPage(IPageRecordable parentPage,
int inParentIndex) |
LeafPage |
split(DataRecordIdentifier dataRecordIdentifier,
IDataBlock dataBlock) |
int |
tryBalanceOrMerge(LeafPage leafPage) |
void |
updateByteSize() |
boolean |
wellFilled() |
entrySize
getPageRecord, getPositionInFile, getPreviousRecordPositionInFile, setPageRecord, setValueIsChangedValueToSave, setValueIsNotChanged
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPositionInFile
getPageRecord, setPageRecord
setValueIsChangedValueToSave, setValueIsNotChanged
public static final int HEAD_TAIL_SIZE
public static final int MAX_NUMBER_OF_ENTRIES
public EnumRecordType getRecordType()
getRecordType
in interface IPageRecordable
public int getNumberOfPage()
IPageRecordable
getNumberOfPage
in interface IPageRecordable
public void setParentPage(IPageRecordable parentPage, int inParentIndex)
setParentPage
in interface IPageRecordable
public IPageRecordable getParentPage()
getParentPage
in interface IPageRecordable
public int getInParentIndex() throws HeapException
getInParentIndex
in interface IPageRecordable
HeapException
public int getNumberOfKeyEntries()
public DataRecordIdentifier getKey(int index)
public long getBlockPointer(int index)
public long getNext()
public void setNext(long next) throws HeapException
HeapException
public void setEntry(int index, long pagePointer, DataRecordIdentifier key) throws HeapException
HeapException
public int getByteSize()
getByteSize
in interface IPageRecordable
public final void updateByteSize() throws HeapException
updateByteSize
in interface IPageRecordable
HeapException
public long getDataBlockPosition(DataRecordIdentifier dataRecordIdentifier)
dataRecordIdentifier
- public int getIndex()
public void setDataBlock(int index, IDataBlock dataBlock) throws HeapException
HeapException
public boolean add(DataRecordIdentifier dataRecordIdentifier, IDataBlock dataBlock) throws HeapException
dataRecordIdentifier
- dataBlock
- HeapException
public LeafPage split(DataRecordIdentifier dataRecordIdentifier, IDataBlock dataBlock) throws HeapException
dataRecordIdentifier
- key to adddataBlock
- added data for the keyHeapException
public void remove(int index) throws HeapException
HeapException
public boolean wellFilled()
public DataRecordIdentifier getLastKey()
getLastKey
in interface ILeafPage
getLastKey
in class AbstractNodePage
public int tryBalanceOrMerge(LeafPage leafPage) throws HeapException
leafPage
- HeapException
public DataRecordIdentifier getFirstKey()
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.