|
Oracle® Coherence Java API Reference v3.5 E14977-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.io.bdb.DatabaseFactory
public class DatabaseFactory
Factory for Berkeley DB Environments and Databases. <p/> 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(java.lang.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. |
java.lang.String |
getUniqueDbName() Get a unique (within the Factory) database name. |
protected DatabaseFactory.EnvironmentHolder |
instantiateEnvironment(BerkeleyDBBinaryStoreManager bdbManager) Create a EnvironmentHolder within the specified parent directory. |
java.lang.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 forcom.sleepycat.je.DatabaseException
- if the Berkeley DB Environment could not be createdMethod Detail |
---|
public java.lang.String toString()
protected void finalize() throws java.lang.Throwable
java.lang.Throwable
public com.sleepycat.je.Database createNamedDatabase(java.lang.String sName) throws com.sleepycat.je.DatabaseException
sName
- the name of the database to createcom.sleepycat.je.DatabaseException
- if the Database creation failedpublic java.lang.String getUniqueDbName()
protected DatabaseFactory.EnvironmentHolder instantiateEnvironment(BerkeleyDBBinaryStoreManager bdbManager) throws com.sleepycat.je.DatabaseException
bdbManager
- the BinaryStore to create the environment forcom.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()
|
Oracle® Coherence Java API Reference v3.5 E14977-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |