org.geotools.index.rtree.fs
Class FileSystemPageStore

java.lang.Object
  extended byorg.geotools.index.rtree.PageStore
      extended byorg.geotools.index.rtree.fs.FileSystemPageStore

public class FileSystemPageStore
extends PageStore

DOCUMENT ME!

Author:
Tommaso Nolli

Field Summary
protected static byte B_DOUBLE
           
protected static byte B_FLOAT
           
protected static byte B_INTEGER
           
protected static byte B_LONG
           
protected static byte B_SHORT
           
protected static byte B_STRING
           
 
Fields inherited from class org.geotools.index.rtree.PageStore
def, maxNodeEntries, minNodeEntries, SPLIT_LINEAR, SPLIT_QUADRATIC, splitAlg
 
Constructor Summary
FileSystemPageStore(java.io.File file)
          Loads an index from the specified File, if the file doesn't exists or is 0 length, a new index will be created with default values for maxNodeEntries, minNodeEntries and splitAlgorithm
FileSystemPageStore(java.io.File file, DataDefinition def)
          DOCUMENT ME!
FileSystemPageStore(java.io.File file, DataDefinition def, int maxNodeEntries, int minNodeEntries, short splitAlg)
          Create and index with the specified values, if the file exists then an RTreeException will be thrown.
 
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!
 boolean getForceChannel()
          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
 Node getRoot()
          DOCUMENT ME!
 short getSplitAlgorithm()
          DOCUMENT ME!
 void setForceChannel(boolean b)
          If this is set to true, then every write to the index will call a force() on the associated channel
 void setRoot(Node node)
          DOCUMENT ME!
 
Methods inherited from class org.geotools.index.rtree.PageStore
getReadLock, getWriteLock, releaseLock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

B_SHORT

protected static final byte B_SHORT
See Also:
Constant Field Values

B_INTEGER

protected static final byte B_INTEGER
See Also:
Constant Field Values

B_LONG

protected static final byte B_LONG
See Also:
Constant Field Values

B_FLOAT

protected static final byte B_FLOAT
See Also:
Constant Field Values

B_DOUBLE

protected static final byte B_DOUBLE
See Also:
Constant Field Values

B_STRING

protected static final byte B_STRING
See Also:
Constant Field Values
Constructor Detail

FileSystemPageStore

public FileSystemPageStore(java.io.File file)
                    throws TreeException
Loads an index from the specified File, if the file doesn't exists or is 0 length, a new index will be created with default values for maxNodeEntries, minNodeEntries and splitAlgorithm

Parameters:
file - The file that stores the index
Throws:
TreeException

FileSystemPageStore

public FileSystemPageStore(java.io.File file,
                           DataDefinition def)
                    throws TreeException
DOCUMENT ME!

Parameters:
file -
def -
Throws:
TreeException

FileSystemPageStore

public FileSystemPageStore(java.io.File file,
                           DataDefinition def,
                           int maxNodeEntries,
                           int minNodeEntries,
                           short splitAlg)
                    throws TreeException
Create and index with the specified values, if the file exists then an RTreeException will be thrown.

Parameters:
file - The file to store the index
def - DOCUMENT ME!
maxNodeEntries -
minNodeEntries -
splitAlg -
Throws:
TreeException
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:
org.geotools.index.rtree.PageStore#getNode(long, 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)

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
See Also:
PageStore.free(org.geotools.index.rtree.Node)

close

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

Specified by:
close in class PageStore
Throws:
TreeException
See Also:
PageStore.close()

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
See Also:
PageStore.getMinNodeEntries()

getSplitAlgorithm

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

Overrides:
getSplitAlgorithm in class PageStore
Returns:
The split algorithm to use
See Also:
PageStore.getSplitAlgorithm()

getDataDefinition

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

Overrides:
getDataDefinition in class PageStore
Returns:
See Also:
org.geotools.index.rtree.PageStore#getKeyDefinition()

setForceChannel

public void setForceChannel(boolean b)
If this is set to true, then every write to the index will call a force() on the associated channel

Parameters:
b - true or false

getForceChannel

public boolean getForceChannel()
DOCUMENT ME!

Returns:
The state of Force channel parameter


Copyright © GeoTools. All Rights Reserved.