jdbm.recman
Class FreePhysicalRowIdPage

java.lang.Object
  extended by jdbm.recman.PageHeader
      extended by jdbm.recman.FreePhysicalRowIdPage
All Implemented Interfaces:
BlockView

final class FreePhysicalRowIdPage
extends PageHeader

Class describing a page that holds physical rowids that were freed.


Field Summary
(package private) static short ELEMS_PER_PAGE
           
(package private) static short O_FREE
           
(package private)  FreePhysicalRowId[] slots
           
 
Fields inherited from class jdbm.recman.PageHeader
block, SIZE
 
Constructor Summary
FreePhysicalRowIdPage(BlockIo block)
          Constructs a data page view from the indicated block.
 
Method Summary
(package private)  FreePhysicalRowId alloc(int slot)
          Allocates a slot
(package private)  void free(int slot)
          Frees a slot
(package private)  FreePhysicalRowId get(int slot)
          Returns the value of the indicated slot
(package private)  short getCount()
          Returns the number of free rowids
(package private)  int getFirstFree()
          Returns first free slot, -1 if no slots are available
(package private)  int getFirstLargerThan(int size)
          Returns first slot with available size >= indicated size, or -1 if no slots are available.
(package private) static FreePhysicalRowIdPage getFreePhysicalRowIdPageView(BlockIo block)
          Factory method to create or return a data page for the indicated block.
(package private)  boolean isAllocated(int slot)
          Returns true if a slot is allocated
(package private)  boolean isFree(int slot)
          Returns true if a slot is free
(package private)  short slotToOffset(int slot)
          Converts slot to offset
 
Methods inherited from class jdbm.recman.PageHeader
getMagic, getNext, getPrev, getView, paranoiaMagicOk, setNext, setPrev, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

O_FREE

static final short O_FREE
See Also:
Constant Field Values

ELEMS_PER_PAGE

static final short ELEMS_PER_PAGE
See Also:
Constant Field Values

slots

FreePhysicalRowId[] slots
Constructor Detail

FreePhysicalRowIdPage

FreePhysicalRowIdPage(BlockIo block)
Constructs a data page view from the indicated block.

Method Detail

getFreePhysicalRowIdPageView

static FreePhysicalRowIdPage getFreePhysicalRowIdPageView(BlockIo block)
Factory method to create or return a data page for the indicated block.


getCount

short getCount()
Returns the number of free rowids


free

void free(int slot)
Frees a slot


alloc

FreePhysicalRowId alloc(int slot)
Allocates a slot


isAllocated

boolean isAllocated(int slot)
Returns true if a slot is allocated


isFree

boolean isFree(int slot)
Returns true if a slot is free


get

FreePhysicalRowId get(int slot)
Returns the value of the indicated slot


slotToOffset

short slotToOffset(int slot)
Converts slot to offset


getFirstFree

int getFirstFree()
Returns first free slot, -1 if no slots are available


getFirstLargerThan

int getFirstLargerThan(int size)
Returns first slot with available size >= indicated size, or -1 if no slots are available.



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