jdbm.recman
Class PageHeader

java.lang.Object
  extended by jdbm.recman.PageHeader
All Implemented Interfaces:
BlockView
Direct Known Subclasses:
DataPage, FreeLogicalRowIdPage, FreePhysicalRowIdPage, TranslationPage

public class PageHeader
extends java.lang.Object
implements BlockView

This class represents a page header. It is the common superclass for all different page views.


Field Summary
protected  BlockIo block
           
protected static short SIZE
           
 
Constructor Summary
protected PageHeader(BlockIo block)
          Constructs a PageHeader object from a block
(package private) PageHeader(BlockIo block, short type)
          Constructs a new PageHeader of the indicated type.
 
Method Summary
(package private)  short getMagic()
          Returns the magic code
(package private)  long getNext()
          Returns the next block.
(package private)  long getPrev()
          Returns the previous block.
(package private) static PageHeader getView(BlockIo block)
          Factory method to create or return a page header for the indicated block.
protected  void paranoiaMagicOk()
          For paranoia mode
(package private)  void setNext(long next)
          Sets the next block.
(package private)  void setPrev(long prev)
          Sets the previous block.
(package private)  void setType(short type)
          Sets the type of the page header
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIZE

protected static final short SIZE
See Also:
Constant Field Values

block

protected BlockIo block
Constructor Detail

PageHeader

protected PageHeader(BlockIo block)
Constructs a PageHeader object from a block

Parameters:
block - The block that contains the file header
Throws:
IOException - if the block is too short to keep the file header.

PageHeader

PageHeader(BlockIo block,
           short type)
Constructs a new PageHeader of the indicated type. Used for newly created pages.

Method Detail

getView

static PageHeader getView(BlockIo block)
Factory method to create or return a page header for the indicated block.


paranoiaMagicOk

protected void paranoiaMagicOk()
For paranoia mode


getMagic

short getMagic()
Returns the magic code


getNext

long getNext()
Returns the next block.


setNext

void setNext(long next)
Sets the next block.


getPrev

long getPrev()
Returns the previous block.


setPrev

void setPrev(long prev)
Sets the previous block.


setType

void setType(short type)
Sets the type of the page header



Cees de Groot (C) 2000-2001. All rights reserved http://jdbm.sourceforge.net