org.geotools.index.rtree
Class PageStore

java.lang.Object
  extended byorg.geotools.index.rtree.PageStore
Direct Known Subclasses:
DatabasePageStore, FileSystemPageStore, FileSystemPageStore, MemoryPageStore

public abstract class PageStore
extends java.lang.Object

DOCUMENT ME!

Author:
Tommaso Nolli

Field Summary
protected  DataDefinition def
           
protected  int maxNodeEntries
           
protected  int minNodeEntries
           
static short SPLIT_LINEAR
           
static short SPLIT_QUADRATIC
           
protected  short splitAlg
           
 
Constructor Summary
PageStore()
           
PageStore(DataDefinition def, int maxNodeEntries, int minNodeEntries, short splitAlg)
          DOCUMENT ME!
 
Method Summary
abstract  void close()
          DOCUMENT ME!
abstract  Entry createEntryPointingNode(Node node)
          DOCUMENT ME!
abstract  void free(Node node)
          Frees resources used by this Node
 DataDefinition getDataDefinition()
          DOCUMENT ME!
abstract  Node getEmptyNode(boolean isLeaf)
          DOCUMENT ME!
 int getMaxNodeEntries()
          DOCUMENT ME!
 int getMinNodeEntries()
          DOCUMENT ME!
abstract  Node getNode(Entry parentEntry, Node parent)
          Returns the Node pointed by this entry and having this Node as parent
 Lock getReadLock()
          Aquires a read lock to the store
abstract  Node getRoot()
          DOCUMENT ME!
 short getSplitAlgorithm()
          DOCUMENT ME!
 Lock getWriteLock()
          Aquires a write lock to the store
 void releaseLock(Lock lock)
          DOCUMENT ME!
abstract  void setRoot(Node node)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPLIT_QUADRATIC

public static final short SPLIT_QUADRATIC
See Also:
Constant Field Values

SPLIT_LINEAR

public static final short SPLIT_LINEAR
See Also:
Constant Field Values

def

protected DataDefinition def

maxNodeEntries

protected int maxNodeEntries

minNodeEntries

protected int minNodeEntries

splitAlg

protected short splitAlg
Constructor Detail

PageStore

public PageStore()

PageStore

public PageStore(DataDefinition def,
                 int maxNodeEntries,
                 int minNodeEntries,
                 short splitAlg)
          throws TreeException
DOCUMENT ME!

Parameters:
def -
maxNodeEntries -
minNodeEntries -
splitAlg -
Throws:
TreeException
java.lang.UnsupportedOperationException - DOCUMENT ME!
Method Detail

getRoot

public abstract Node getRoot()
DOCUMENT ME!

Returns:

setRoot

public abstract void setRoot(Node node)
                      throws TreeException
DOCUMENT ME!

Parameters:
node -
Throws:
TreeException - DOCUMENT ME!

getEmptyNode

public abstract Node getEmptyNode(boolean isLeaf)
DOCUMENT ME!

Parameters:
isLeaf -
Returns:

getNode

public abstract Node getNode(Entry parentEntry,
                             Node parent)
                      throws TreeException
Returns the Node pointed by this entry and having this Node as parent

Parameters:
parentEntry -
parent -
Returns:
Throws:
TreeException - DOCUMENT ME!

createEntryPointingNode

public abstract Entry createEntryPointingNode(Node node)
DOCUMENT ME!

Parameters:
node -
Returns:

getMaxNodeEntries

public int getMaxNodeEntries()
DOCUMENT ME!

Returns:
The maximum number of Entrys per page

getMinNodeEntries

public int getMinNodeEntries()
DOCUMENT ME!

Returns:
The minimum number of Entrys per page

getSplitAlgorithm

public short getSplitAlgorithm()
DOCUMENT ME!

Returns:
The split algorithm to use

getDataDefinition

public DataDefinition getDataDefinition()
DOCUMENT ME!

Returns:

free

public abstract void free(Node node)
Frees resources used by this Node

Parameters:
node - The Node to free

getWriteLock

public Lock getWriteLock()
                  throws LockTimeoutException
Aquires a write lock to the store

Returns:
an Object rapresenting the lock
Throws:
LockTimeoutException

getReadLock

public Lock getReadLock()
                 throws LockTimeoutException
Aquires a read lock to the store

Returns:
an Object rapresenting the lock
Throws:
LockTimeoutException

releaseLock

public void releaseLock(Lock lock)
DOCUMENT ME!

Parameters:
lock -

close

public abstract void close()
                    throws TreeException
DOCUMENT ME!

Throws:
TreeException


Copyright © GeoTools. All Rights Reserved.