|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xerial.db.heap.HeapPage
public class HeapPage
Heap pages support sequential data appends to the database. Page Layout:
---------------------- |CommonPageHeader |numEntries |entrySizeTotal | (entries: ([entry size:VariableLengthInteger, entry data ...]) ) | .... | | | [ pointers to entries (in sorted order) ] ----------------------
| Constructor Summary | |
|---|---|
HeapPage(int bufferSize)
|
|
| Method Summary | |
|---|---|
void |
append(Tuple tuple)
Appends the tuple to this heap page |
int |
getHeaderSize()
|
Iterator<Tuple> |
iterator()
|
void |
loadFrom(Buffer pageBuffer,
TupleFactory tupleFactory)
Loads the heap contents from the buffer |
void |
saveTo(Buffer pageBuffer)
Marshaling the heap contents, and write them to the page buffer |
void |
sortTuples(TupleComparator comparator)
Sort the tuple in this heap page according to the given comparator |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HeapPage(int bufferSize)
| Method Detail |
|---|
public int getHeaderSize()
public void append(Tuple tuple)
throws DBException
tuple -
DBException - when the page has no sufficient space for this tuplepublic void sortTuples(TupleComparator comparator)
comparator - TupleComparator defines total order of the tuples
public void loadFrom(Buffer pageBuffer,
TupleFactory tupleFactory)
throws DBException
pageBuffer - the buffertupleFactory - factory that creates tuples from raw byte arrays
DBException - when page type is not heappublic void saveTo(Buffer pageBuffer)
pageBuffer - public Iterator<Tuple> iterator()
iterator in interface Iterable<Tuple>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
