public class PageDataNode extends Page
Modifier and Type | Field and Description |
---|---|
protected Data |
data
The data page.
|
protected int |
entryCount
The number of entries.
|
protected PageDataIndex |
index
The index.
|
protected long[] |
keys
The row keys.
|
protected int |
memoryEstimated
The estimated heap memory used by this object, in number of double words
(4 bytes each).
|
protected int |
parentPageId
The page number of the parent.
|
protected boolean |
written
Whether the data page is up-to-date.
|
changeCount, FLAG_LAST, TYPE_BTREE_LEAF, TYPE_BTREE_NODE, TYPE_DATA_LEAF, TYPE_DATA_NODE, TYPE_DATA_OVERFLOW, TYPE_EMPTY, TYPE_FREE_LIST, TYPE_STREAM_DATA, TYPE_STREAM_TRUNK
cacheChained, cacheNext, cachePrevious
Modifier and Type | Method and Description |
---|---|
boolean |
canRemove()
Check if the object can be removed from the cache.
|
int |
getMemory()
Get the estimated heap memory size.
|
void |
moveTo(Session session,
int newPos)
Copy the data to a new location, change the parent to point to the new
location, and free up the current page.
|
static Page |
read(PageDataIndex index,
Data data,
int pageId)
Read a data node page.
|
protected void |
remapChildren(int old)
Update the parent id of all children.
|
String |
toString() |
void |
write()
Write the page.
|
add, canMove, insert, insert, insert, remove, remove, remove
compareTo, getPos, isChanged, isStream, setChanged, setPos
protected final PageDataIndex index
protected int parentPageId
protected final Data data
protected int entryCount
protected long[] keys
protected boolean written
protected int memoryEstimated
public static Page read(PageDataIndex index, Data data, int pageId)
index
- the indexdata
- the datapageId
- the page idprotected void remapChildren(int old)
old
- the previous positionpublic void write()
Page
public void moveTo(Session session, int newPos)
Page
public int getMemory()
getMemory
in class CacheObject
public boolean canRemove()
CacheObject
canRemove
in class CacheObject
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.