net.sourceforge.jgeocoder.tiger
Class JGeocoderConfig

java.lang.Object
  extended by net.sourceforge.jgeocoder.tiger.JGeocoderConfig
All Implemented Interfaces:
Serializable

public class JGeocoderConfig
extends Object
implements Serializable

TODO javadocs me

Author:
jliang
See Also:
Serialized Form

Field Summary
static JGeocoderConfig DEFAULT
           
 
Constructor Summary
JGeocoderConfig()
           
 
Method Summary
 boolean equals(Object obj)
           
 int getBerkeleyDbCachePercent()
          By default, JE sets its cache size proportionally to the JVM memory.
 long getBerkeleyDbCacheSize()
          see http://www.oracle.com/technology/documentation/berkeley-db/je/java/com/sleepycat/je/EnvironmentMutableConfig.html#setCachePercent(int)
 String getJgeocoderDataHome()
           
 DataSource getTigerDataSource()
          get the DataSource to the tiger/line address database
 int hashCode()
           
 void setBerkeleyDbCachePercent(int berkeleyDbCachePercent)
           
 void setBerkeleyDbCacheSize(long berkeleyDbCacheSize)
          Configures the memory available to the database system, in bytes.
 void setJgeocoderDataHome(String jgeocoderDataHome)
           
 void setTigerDataSource(DataSource tigerDataSource)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT

public static final JGeocoderConfig DEFAULT
Constructor Detail

JGeocoderConfig

public JGeocoderConfig()
Method Detail

getTigerDataSource

public DataSource getTigerDataSource()
get the DataSource to the tiger/line address database

Returns:

setTigerDataSource

public void setTigerDataSource(DataSource tigerDataSource)

getBerkeleyDbCachePercent

public int getBerkeleyDbCachePercent()

By default, JE sets its cache size proportionally to the JVM memory. This formula is used:

je.maxMemoryPercent *  JVM maximum memory
     

where JVM maximum memory is specified by the JVM -Xmx flag. setCachePercent() specifies the percentage used and is equivalent to setting the je.maxMemoryPercent property in the je.properties file.

Calling setCacheSize() with a non-zero value overrides the percentage based calculation and sets the cache size explicitly.

Note that the log buffer cache may be cleared if the cache size is changed after the environment has been opened.

If setSharedCache(true) is called, setCacheSize and setCachePercent specify the total size of the shared cache, and changing these parameters will change the size of the shared cache.

Parameters:
berkeleyDbCachePercent - berkeleyDb default will be used if set to negative

setBerkeleyDbCachePercent

public void setBerkeleyDbCachePercent(int berkeleyDbCachePercent)

getBerkeleyDbCacheSize

public long getBerkeleyDbCacheSize()
see http://www.oracle.com/technology/documentation/berkeley-db/je/java/com/sleepycat/je/EnvironmentMutableConfig.html#setCachePercent(int)

Returns:

setBerkeleyDbCacheSize

public void setBerkeleyDbCacheSize(long berkeleyDbCacheSize)
Configures the memory available to the database system, in bytes.

Equivalent to setting the je.maxMemory property in the je.properties file. The system will evict database objects when it comes within a prescribed margin of the limit.

By default, JE sets the cache size to:

je.maxMemoryPercent * JVM maximum memory

where JVM maximum memory is specified by the JVM -Xmx flag. However, calling setCacheSize() with a non-zero value overrides the percentage based calculation and sets the cache size explicitly.

Note that the cache does not include transient objects created by the JE library, such as cursors, locks and transactions.

Note that the log buffer cache may be cleared if the cache size is changed after the environment has been opened.

If setSharedCache(true) is called, setCacheSize and setCachePercent specify the total size of the shared cache, and changing these parameters will change the size of the shared cache.

Parameters:
berkeleyDbCacheSize - berkeleyDb default will be used if set to negative

getJgeocoderDataHome

public String getJgeocoderDataHome()

setJgeocoderDataHome

public void setJgeocoderDataHome(String jgeocoderDataHome)

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2008. All Rights Reserved.