|
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.AbstractBinaryStore
com.tangosol.io.bdb.BerkeleyDBBinaryStore
public class BerkeleyDBBinaryStore
An implementation of the BinaryStore interface using Sleepycat Berkeley DB Java Edition.
Nested Class Summary | |
---|---|
protected class |
BerkeleyDBBinaryStore.DatabaseHolder
The DatabaseHolder class is used as a wrapper around a Berkeley DB Database object. |
Field Summary | |
---|---|
protected BerkeleyDBBinaryStore.DatabaseHolder |
m_db
The Database handle. |
protected DatabaseFactory |
m_factory
Factory used to create this Database. |
Constructor Summary | |
---|---|
BerkeleyDBBinaryStore(String sDbName,
DatabaseFactory dbFactory)
Create a new Berkeley DB BinaryStore using the supplied DatabaseFactory. |
Method Summary | |
---|---|
void |
close()
Close the BinaryStore. |
void |
erase(Binary binKey)
Remove the specified key from the underlying store if present. |
void |
eraseAll()
Remove all data from the underlying store. |
BerkeleyDBBinaryStore.DatabaseHolder |
getDbHolder()
Get the DatabaseHolder. |
DatabaseFactory |
getFactory()
Get the DatabaseFactory used to create the underlying Database. |
protected void |
init(String sDbName,
DatabaseFactory dbFactory)
Initialize the BinaryStore. |
Iterator |
keys()
Iterate all keys in the underlying store. |
Binary |
load(Binary binKey)
Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store. |
void |
store(Binary binKey,
Binary binValue)
Store the specified value under the specific key in the underlying store. |
String |
toString()
Return a human readable description of the BinaryStore. |
Methods inherited from class com.tangosol.io.AbstractBinaryStore |
---|
getDefaultDirectory |
Field Detail |
---|
protected volatile BerkeleyDBBinaryStore.DatabaseHolder m_db
protected DatabaseFactory m_factory
Constructor Detail |
---|
public BerkeleyDBBinaryStore(String sDbName, DatabaseFactory dbFactory) throws com.sleepycat.je.DatabaseException
sDbName
- the name of the table to store the cache's data in,
null indicates a temporary table name.dbFactory
- the factory to use to create the Database
com.sleepycat.je.DatabaseException
- if the Database creation failedMethod Detail |
---|
protected void init(String sDbName, DatabaseFactory dbFactory) throws com.sleepycat.je.DatabaseException
sDbName
- the name of the table to store the cache's data in,
null indicates a temporary table name.dbFactory
- the factory to use to create the Database
com.sleepycat.je.DatabaseException
- if the Database creation failedpublic String toString()
public Binary load(Binary binKey)
load
in interface BinaryStore
load
in class AbstractBinaryStore
binKey
- key whose associated value is to be returned
public void store(Binary binKey, Binary binValue)
store
in interface BinaryStore
store
in class AbstractBinaryStore
binKey
- key to store the value underbinValue
- value to be storedpublic void erase(Binary binKey)
erase
in interface BinaryStore
erase
in class AbstractBinaryStore
binKey
- key whose mapping is to be removed from the mappublic void eraseAll()
eraseAll
in interface BinaryStore
eraseAll
in class AbstractBinaryStore
public Iterator keys()
keys
in interface BinaryStore
keys
in class AbstractBinaryStore
public void close()
public BerkeleyDBBinaryStore.DatabaseHolder getDbHolder()
public DatabaseFactory getFactory()
|
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 |