|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tangosol.util.Base
com.tangosol.io.bdb.DatabaseFactory
public class DatabaseFactory
Factory for Berkeley DB Environments and Databases.
Temporary Environments will be automatically deleted upon JVM shutdown or GC.
Nested Class Summary | |
---|---|
protected static class |
DatabaseFactory.EnvironmentHolder
Holder for Berkeley DB Environment and its Databases. |
Field Summary | |
---|---|
protected long |
m_cDbId
Counter used to generate unique Database names for this Environment. |
protected com.sleepycat.je.DatabaseConfig |
m_dbConfig
Configuration to use when creating new Databases. |
protected DatabaseFactory.EnvironmentHolder |
m_envHolder
Holder for Environment used to create Databases. |
Constructor Summary | |
---|---|
DatabaseFactory(BerkeleyDBBinaryStoreManager bdbManager)
Construct a DatabaseFactory for a given Berkeley DB Environment. |
Method Summary | |
---|---|
com.sleepycat.je.Database |
createNamedDatabase(String sName)
Create a named Database instance. |
protected void |
finalize()
Finalize for the DatabaseFactory. |
void |
forgetDatabase(com.sleepycat.je.Database db)
Remove a database handle from the cleanup list. |
com.sleepycat.je.DatabaseConfig |
getDbConfig()
Get the DatabaseConfiguration used to create Databases. |
long |
getDbIdCounter()
Get the DB ID Counter value. |
DatabaseFactory.EnvironmentHolder |
getEnvHolder()
Get the EnvironmentHolder. |
String |
getUniqueDbName()
Get a unique (within the Factory) database name. |
protected DatabaseFactory.EnvironmentHolder |
instantiateEnvironment(BerkeleyDBBinaryStoreManager bdbManager)
Create a EnvironmentHolder within the specified parent directory. |
String |
toString()
Output the DatabaseFactory state as a String. |
Field Detail |
---|
protected DatabaseFactory.EnvironmentHolder m_envHolder
protected com.sleepycat.je.DatabaseConfig m_dbConfig
protected long m_cDbId
Constructor Detail |
---|
public DatabaseFactory(BerkeleyDBBinaryStoreManager bdbManager) throws com.sleepycat.je.DatabaseException
bdbManager
- the BinaryStoreManager to create Databases for
com.sleepycat.je.DatabaseException
- if the Berkeley DB Environment could not be
createdMethod Detail |
---|
public String toString()
protected void finalize() throws Throwable
Throwable
public com.sleepycat.je.Database createNamedDatabase(String sName) throws com.sleepycat.je.DatabaseException
sName
- the name of the database to create
com.sleepycat.je.DatabaseException
- if the Database creation failedpublic String getUniqueDbName()
protected DatabaseFactory.EnvironmentHolder instantiateEnvironment(BerkeleyDBBinaryStoreManager bdbManager) throws com.sleepycat.je.DatabaseException
bdbManager
- the BinaryStore to create the environment for
com.sleepycat.je.DatabaseException
- if the Environment could not be createdpublic void forgetDatabase(com.sleepycat.je.Database db)
db
- the Database to remove from listpublic DatabaseFactory.EnvironmentHolder getEnvHolder()
public com.sleepycat.je.DatabaseConfig getDbConfig()
public long getDbIdCounter()
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |