|
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.io.bdb.BerkeleyDBBinaryStore.DatabaseHolder
protected class BerkeleyDBBinaryStore.DatabaseHolder
The DatabaseHolder class is used as a wrapper around a Berkeley DB Database object.
Database objects cannot be closed if they are in use by other threads. The Java garbage collector and this holder are utilized to delay closing the Database until it is guaranteed to not be in use.
Field Summary | |
---|---|
protected com.sleepycat.je.Database |
m_db
The underlying Database Handle. |
protected boolean |
m_fTemporary
Flag indicating if the database is temporary. |
protected String |
m_sDbName
The name of the underlying Database. |
Constructor Summary | |
---|---|
BerkeleyDBBinaryStore.DatabaseHolder(String sDbName)
Construct a DatabaseHolder, including a Database. |
Method Summary | |
---|---|
protected void |
closeDb()
Close the Database. |
protected void |
finalize()
Finalize the holder, deleting the datbase if it is temporary. |
com.sleepycat.je.Database |
getDb()
Get the underlying Database handle. |
String |
getName()
Get the name of the underlying Database. |
boolean |
isTemporary()
Return if the database is temporary. |
String |
toString()
Return the Holder's human readable description. |
Field Detail |
---|
protected com.sleepycat.je.Database m_db
protected String m_sDbName
protected boolean m_fTemporary
Constructor Detail |
---|
public BerkeleyDBBinaryStore.DatabaseHolder(String sDbName) throws com.sleepycat.je.DatabaseException
sDbName
- if non null specifies the name of a persistent
database.
com.sleepycat.je.DatabaseException
Method Detail |
---|
public String toString()
protected void finalize() throws Throwable
Throwable
- if the removal failspublic com.sleepycat.je.Database getDb()
public String getName()
public boolean isTemporary()
protected void closeDb() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
|
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 |