public class PageHeader extends java.lang.Object implements BlockView
| Modifier and Type | Field and Description |
|---|---|
protected BlockIo |
blockIo
the page header block this view is associated with
|
private static short |
O_MAGIC
the page (BlockIo's type code) short magic code
|
private static short |
O_NEXT
the long block id of the next block in the block list
|
private static short |
O_PREV
the long block id of the previous block in the block list
|
protected static short |
SIZE
the size of this page header
|
| Modifier | Constructor and Description |
|---|---|
protected |
PageHeader(BlockIo blockIo)
Constructs a PageHeader object from a block
|
(package private) |
PageHeader(BlockIo blockIo,
short type)
Constructs a new PageHeader of the indicated type.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) short |
getMagic() |
(package private) long |
getNext() |
(package private) long |
getPrev() |
(package private) static PageHeader |
getView(BlockIo blockIo)
Factory method to create or return a page header for the indicated block.
|
private boolean |
magicOk()
Returns true if the magic corresponds with the fileHeader magic.
|
protected void |
paranoiaMagicOk()
For paranoia mode
|
(package private) void |
setNext(long next)
Sets the next blockIo.
|
(package private) void |
setPrev(long prev)
Sets the previous block.
|
(package private) void |
setType(short type)
Sets the type of the page header
|
java.lang.String |
toString() |
private static final short O_MAGIC
private static final short O_NEXT
private static final short O_PREV
protected static final short SIZE
protected BlockIo blockIo
protected PageHeader(BlockIo blockIo)
blockIo - The block that contains the page headerjava.io.IOException - if the block is too short to keep the page header.PageHeader(BlockIo blockIo, short type)
static PageHeader getView(BlockIo blockIo)
private boolean magicOk()
protected void paranoiaMagicOk()
short getMagic()
long getNext()
void setNext(long next)
The - next Block IDlong getPrev()
void setPrev(long prev)
void setType(short type)
type - The PageHeader type to store at position 0public java.lang.String toString()
toString in class java.lang.Object