gov.nih.nlm.nls.dbm
Class JDbmFactory

java.lang.Object
  extended bygov.nih.nlm.nls.dbm.JDbmFactory

public final class JDbmFactory
extends java.lang.Object

JDbmFactory switches to the currently in-vogue JDBM. Tue Dec 04 12:00:16 EST 2001, divita Initial Version


Field Summary
static int BERKELEY_BTREE_JDBM
           
static int MYSQL_JDBM
           
static int SOURCE_FORGE_JDBM
           
static int STORE_JDBM
           
static int UNCOMMON_JDBM
           
static int UNKNOWN
           
 
Constructor Summary
JDbmFactory()
           
 
Method Summary
static JDbmInterface build(java.lang.String pFileName, int pMode)
          The method build returns the dbm object referenced by pFilename.
static JDbmInterface build(java.lang.String pFileName, int pMode, GlobalBehavior pSettings)
          The method build returns the dbm object referenced by pFilename.
static JDbmInterface build(java.lang.String pFileName, int pMode, GlobalBehavior pSettings, int pLoadMaxSize, int pMaxCacheSize)
          The method build returns the dbm object referenced by pFilename.
static JDbmInterface build(java.lang.String pFileName, int pMode, int pType)
          The method build returns the dbm object referenced by pFilename.
static JDbmInterface build(java.lang.String pFileName, int pMode, int pType, int pLoadCacheSize, int pMaxCacheSize)
          The method build returns the dbm object referenced by pFilename.
static java.lang.String toString(int pType)
          The method toString returns the name of the database for the enumerated type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCE_FORGE_JDBM

public static final int SOURCE_FORGE_JDBM
See Also:
Constant Field Values

MYSQL_JDBM

public static final int MYSQL_JDBM
See Also:
Constant Field Values

STORE_JDBM

public static final int STORE_JDBM
See Also:
Constant Field Values

UNCOMMON_JDBM

public static final int UNCOMMON_JDBM
See Also:
Constant Field Values

BERKELEY_BTREE_JDBM

public static final int BERKELEY_BTREE_JDBM
See Also:
Constant Field Values

UNKNOWN

public static final int UNKNOWN
See Also:
Constant Field Values
Constructor Detail

JDbmFactory

public JDbmFactory()
Method Detail

build

public static JDbmInterface build(java.lang.String pFileName,
                                  int pMode)
                           throws java.lang.Exception
The method build returns the dbm object referenced by pFilename.

Parameters:
pFileName - jdbm database filename.
pMode - JDBM.WRITE_ONLY|JDBM.READ_WRITE|JDBM.READ_ONLY
Returns:
a object instance conforming to the interface JDbmInterface.
Throws:
java.lang.Exception

build

public static JDbmInterface build(java.lang.String pFileName,
                                  int pMode,
                                  GlobalBehavior pSettings)
                           throws java.lang.Exception
The method build returns the dbm object referenced by pFilename.

Parameters:
pFileName - jdbm database filename.
pMode - JDBM.WRITE_ONLY|JDBM.READ_WRITE|JDBM.READ_ONLY
pSettings -
Returns:
a object instance conforming to the interface JDbmInterface.
Throws:
java.lang.Exception

build

public static JDbmInterface build(java.lang.String pFileName,
                                  int pMode,
                                  GlobalBehavior pSettings,
                                  int pLoadMaxSize,
                                  int pMaxCacheSize)
                           throws java.lang.Exception
The method build returns the dbm object referenced by pFilename.

Parameters:
pFileName - jdbm database filename.
pMode - JDBM.WRITE_ONLY|JDBM.READ_WRITE|JDBM.READ_ONLY
pSettings -
pLoadMaxSize - The cache size in Mb to suck into memory initially
pMaxCacheSize - The max cache size in Mb this can grow to. (This is currently only used for the berkeley btree impl).
Returns:
a object instance conforming to the interface JDbmInterface.
Throws:
java.lang.Exception

build

public static JDbmInterface build(java.lang.String pFileName,
                                  int pMode,
                                  int pType)
                           throws java.lang.Exception
The method build returns the dbm object referenced by pFilename.

Parameters:
pFileName - jdbm database filename.
pMode - JDBM.WRITE_ONLY|JDBM.READ_WRITE|JDBM.READ_ONLY
pType - 1=sourceForge 2=MySql 3=Russell's store 4=Uncommon
Returns:
a object instance conforming to the interface JDbmInterface.
Throws:
java.lang.Exception

build

public static JDbmInterface build(java.lang.String pFileName,
                                  int pMode,
                                  int pType,
                                  int pLoadCacheSize,
                                  int pMaxCacheSize)
                           throws java.lang.Exception
The method build returns the dbm object referenced by pFilename.

Parameters:
pFileName - jdbm database filename.
pMode - JDBM.WRITE_ONLY|JDBM.READ_WRITE|JDBM.READ_ONLY
pType - 1=sourceForge 2=MySql 3=Russell's store 4=Uncommon
pLoadCacheSize - The cache size in Mb to suck into memory initially
pMaxCacheSize - The max size the cache can grow in Mb for this index (Currently only used with the Berkeley db implementation)
Returns:
a object instance conforming to the interface JDbmInterface.
Throws:
java.lang.Exception

toString

public static java.lang.String toString(int pType)
                                 throws java.lang.Exception
The method toString returns the name of the database for the enumerated type

Parameters:
pType -
Returns:
String
Throws:
java.lang.Exception


The use and distribution of this material is subject to the terms and conditions included in the file SPECIALIST_NLP_TOOLS_TERMS_AND_CONDITIONS.TXT, located in the root directory of the distribution.