org.geotools.index.rtree.database
Class DatabasePageStore

java.lang.Object
  extended byorg.geotools.index.rtree.PageStore
      extended byorg.geotools.index.rtree.database.DatabasePageStore

public class DatabasePageStore
extends PageStore

DOCUMENT ME!

Author:
Tommaso Nolli

Field Summary
protected static int DEF_MAX
           
protected static int DEF_MIN
           
protected static short DEF_SPLIT
           
 
Fields inherited from class org.geotools.index.rtree.PageStore
def, maxNodeEntries, minNodeEntries, SPLIT_LINEAR, SPLIT_QUADRATIC, splitAlg
 
Constructor Summary
DatabasePageStore(javax.sql.DataSource ds, Dialect dialect, java.lang.String rtreeName)
          Constructor
DatabasePageStore(javax.sql.DataSource ds, Dialect dialect, java.lang.String rtreeName, DataDefinition def)
          Constructor
DatabasePageStore(javax.sql.DataSource ds, Dialect dialect, java.lang.String rtreeName, DataDefinition def, int maxNodeEntries, int minNodeEntries, short splitAlg)
          Constructor
 
Method Summary
 void close()
          DOCUMENT ME!
 Entry createEntryPointingNode(Node node)
          DOCUMENT ME!
 void free(Node node)
          Frees resources used by this Node
 DataDefinition getDataDefinition()
          DOCUMENT ME!
 Node getEmptyNode(boolean isLeaf)
          DOCUMENT ME!
 int getMaxNodeEntries()
          DOCUMENT ME!
 int getMinNodeEntries()
          DOCUMENT ME!
 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
 Node getRoot()
          DOCUMENT ME!
 short getSplitAlgorithm()
          DOCUMENT ME!
 Lock getWriteLock()
          Aquires a write lock to the store
 void releaseLock(Lock lock)
          DOCUMENT ME!
 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

DEF_MAX

protected static final int DEF_MAX
See Also:
Constant Field Values

DEF_MIN

protected static final int DEF_MIN
See Also:
Constant Field Values

DEF_SPLIT

protected static final short DEF_SPLIT
See Also:
Constant Field Values
Constructor Detail

DatabasePageStore

public DatabasePageStore(javax.sql.DataSource ds,
                         Dialect dialect,
                         java.lang.String rtreeName)
                  throws TreeException
Constructor

Parameters:
ds -
dialect - DOCUMENT ME!
rtreeName -
Throws:
TreeException - DOCUMENT ME!

DatabasePageStore

public DatabasePageStore(javax.sql.DataSource ds,
                         Dialect dialect,
                         java.lang.String rtreeName,
                         DataDefinition def)
                  throws TreeException
Constructor

Parameters:
ds -
dialect - DOCUMENT ME!
rtreeName -
def -
Throws:
TreeException - DOCUMENT ME!

DatabasePageStore

public DatabasePageStore(javax.sql.DataSource ds,
                         Dialect dialect,
                         java.lang.String rtreeName,
                         DataDefinition def,
                         int maxNodeEntries,
                         int minNodeEntries,
                         short splitAlg)
                  throws TreeException
Constructor

Parameters:
ds -
dialect - DOCUMENT ME!
rtreeName -
def -
maxNodeEntries -
minNodeEntries -
splitAlg -
Throws:
TreeException - DOCUMENT ME!
Method Detail

getRoot

public Node getRoot()
Description copied from class: PageStore
DOCUMENT ME!

Specified by:
getRoot in class PageStore
Returns:
See Also:
PageStore.getRoot()

setRoot

public void setRoot(Node node)
             throws TreeException
Description copied from class: PageStore
DOCUMENT ME!

Specified by:
setRoot in class PageStore
Parameters:
node -
Throws:
TreeException - DOCUMENT ME!
See Also:
PageStore.setRoot(org.geotools.index.rtree.Node)

getEmptyNode

public Node getEmptyNode(boolean isLeaf)
Description copied from class: PageStore
DOCUMENT ME!

Specified by:
getEmptyNode in class PageStore
Parameters:
isLeaf -
Returns:
See Also:
PageStore.getEmptyNode(boolean)

getNode

public Node getNode(Entry parentEntry,
                    Node parent)
             throws TreeException
Description copied from class: PageStore
Returns the Node pointed by this entry and having this Node as parent

Specified by:
getNode in class PageStore
Parameters:
parentEntry -
parent -
Returns:
Throws:
TreeException - DOCUMENT ME!
See Also:
PageStore.getNode(org.geotools.index.rtree.Entry, org.geotools.index.rtree.Node)

createEntryPointingNode

public Entry createEntryPointingNode(Node node)
Description copied from class: PageStore
DOCUMENT ME!

Specified by:
createEntryPointingNode in class PageStore
Parameters:
node -
Returns:
See Also:
PageStore.createEntryPointingNode(org.geotools.index.rtree.Node)

getMaxNodeEntries

public int getMaxNodeEntries()
Description copied from class: PageStore
DOCUMENT ME!

Overrides:
getMaxNodeEntries in class PageStore
Returns:
The maximum number of Entrys per page
See Also:
PageStore.getMaxNodeEntries()

getMinNodeEntries

public int getMinNodeEntries()
Description copied from class: PageStore
DOCUMENT ME!

Overrides:
getMinNodeEntries in class PageStore
Returns:
The minimum number of Entrys per page

getSplitAlgorithm

public short getSplitAlgorithm()
Description copied from class: PageStore
DOCUMENT ME!

Overrides:
getSplitAlgorithm in class PageStore
Returns:
The split algorithm to use

getDataDefinition

public DataDefinition getDataDefinition()
Description copied from class: PageStore
DOCUMENT ME!

Overrides:
getDataDefinition in class PageStore
Returns:

free

public void free(Node node)
Description copied from class: PageStore
Frees resources used by this Node

Specified by:
free in class PageStore
Parameters:
node - The Node to free

getWriteLock

public Lock getWriteLock()
                  throws LockTimeoutException
Description copied from class: PageStore
Aquires a write lock to the store

Overrides:
getWriteLock in class PageStore
Returns:
an Object rapresenting the lock
Throws:
LockTimeoutException

getReadLock

public Lock getReadLock()
                 throws LockTimeoutException
Description copied from class: PageStore
Aquires a read lock to the store

Overrides:
getReadLock in class PageStore
Returns:
an Object rapresenting the lock
Throws:
LockTimeoutException

releaseLock

public void releaseLock(Lock lock)
Description copied from class: PageStore
DOCUMENT ME!

Overrides:
releaseLock in class PageStore
Parameters:
lock -

close

public void close()
           throws TreeException
Description copied from class: PageStore
DOCUMENT ME!

Specified by:
close in class PageStore
Throws:
TreeException


Copyright © GeoTools. All Rights Reserved.