deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.io.rtree
Class MemoryPageFile

java.lang.Object
  extended by org.deegree.io.rtree.PageFile
      extended by org.deegree.io.rtree.MemoryPageFile
All Implemented Interfaces:
Serializable

 class MemoryPageFile
extends PageFile
implements Serializable

A memory based implementation of a PageFile.
Implemented as a Hashtable with keys representing the page file numbers of the saved nodes.

Author:
Wolfgang Baer - WBaer@gmx.de

Field Summary
 
Fields inherited from class org.deegree.io.rtree.PageFile
capacity, dimension, minimum
 
Constructor Summary
protected MemoryPageFile()
          Constructor
 
Method Summary
protected  void close()
          Closes the pagefile.
protected  Node deleteNode(int pageNumber)
          Marks the node at given page number as deleted.
protected  Node readNode(int pageFile)
          Reads a node from the PageFile for given index
protected  int writeNode(Node node)
          Writes a node into the PageFile Method tests if node has already a PageNumber, otherwise a new page number is assigned and returned.
 
Methods inherited from class org.deegree.io.rtree.PageFile
getCapacity, getDimension, getMinimum, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryPageFile

protected MemoryPageFile()
Constructor

Method Detail

readNode

protected Node readNode(int pageFile)
                 throws PageFileException
Description copied from class: PageFile
Reads a node from the PageFile for given index

Specified by:
readNode in class PageFile
Parameters:
pageFile - - index of page file number where node is saved
Returns:
Node
Throws:
PageFileException
See Also:
PageFile.readNode(int)

writeNode

protected int writeNode(Node node)
                 throws PageFileException
Description copied from class: PageFile
Writes a node into the PageFile Method tests if node has already a PageNumber, otherwise a new page number is assigned and returned.

Specified by:
writeNode in class PageFile
Parameters:
node - - Node to write
Returns:
int - page number
Throws:
PageFileException
See Also:
PageFile.writeNode(Node)

deleteNode

protected Node deleteNode(int pageNumber)
Description copied from class: PageFile
Marks the node at given page number as deleted.

Specified by:
deleteNode in class PageFile
Parameters:
pageNumber - - page number
Returns:
Node - deleted node
See Also:
PageFile.deleteNode(int)

close

protected void close()
              throws PageFileException
Description copied from class: PageFile
Closes the pagefile.

Specified by:
close in class PageFile
Throws:
PageFileException
See Also:
PageFile.close()

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org