|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.backends.jeb.DatabaseContainer
public abstract class DatabaseContainer
This class is a wrapper around the JE database object and provides basic read and write methods for entries.
Field Summary | |
---|---|
protected com.sleepycat.je.DatabaseConfig |
dbConfig
The JE database configuration. |
protected EntryContainer |
entryContainer
The database entryContainer. |
protected java.lang.String |
name
The name of the database within the entryContainer. |
Constructor Summary | |
---|---|
protected |
DatabaseContainer(java.lang.String name,
com.sleepycat.je.Environment env,
EntryContainer entryContainer)
Create a new DatabaseContainer object. |
Method Summary | |
---|---|
protected com.sleepycat.je.OperationStatus |
delete(com.sleepycat.je.Transaction txn,
com.sleepycat.je.DatabaseEntry key)
Delete a record from a JE database, with optional debug logging. |
java.lang.String |
getName()
Get the JE database name for this database container. |
long |
getRecordCount()
Get the count of key/data pairs in the database in a JE database. |
protected com.sleepycat.je.OperationStatus |
insert(com.sleepycat.je.Transaction txn,
com.sleepycat.je.DatabaseEntry key,
com.sleepycat.je.DatabaseEntry data)
Insert a record into a JE database, with optional debug logging. |
void |
open()
Opens a JE database in this database container. |
com.sleepycat.je.Cursor |
openCursor(com.sleepycat.je.Transaction txn,
com.sleepycat.je.CursorConfig cursorConfig)
Open a JE cursor on the DN database. |
com.sleepycat.je.PreloadStats |
preload(com.sleepycat.je.PreloadConfig config)
Preload the database into cache. |
protected com.sleepycat.je.OperationStatus |
put(com.sleepycat.je.Transaction txn,
com.sleepycat.je.DatabaseEntry key,
com.sleepycat.je.DatabaseEntry data)
Replace or insert a record into a JE database, with optional debug logging. |
protected com.sleepycat.je.OperationStatus |
read(com.sleepycat.je.Transaction txn,
com.sleepycat.je.DatabaseEntry key,
com.sleepycat.je.DatabaseEntry data,
com.sleepycat.je.LockMode lockMode)
Read a record from a JE database, with optional debug logging. |
java.lang.String |
toString()
Get a string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected EntryContainer entryContainer
protected com.sleepycat.je.DatabaseConfig dbConfig
protected java.lang.String name
Constructor Detail |
---|
protected DatabaseContainer(java.lang.String name, com.sleepycat.je.Environment env, EntryContainer entryContainer) throws com.sleepycat.je.DatabaseException
name
- The name of the entry database.env
- The JE Environment.entryContainer
- The entryContainer of the entry database.
com.sleepycat.je.DatabaseException
- if a JE database error occurs.Method Detail |
---|
public void open() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
- if a JE database error occurs while
openning the index.protected com.sleepycat.je.OperationStatus put(com.sleepycat.je.Transaction txn, com.sleepycat.je.DatabaseEntry key, com.sleepycat.je.DatabaseEntry data) throws com.sleepycat.je.DatabaseException
txn
- The JE transaction handle, or null if none.key
- The record key.data
- The record value.
com.sleepycat.je.DatabaseException
- If an error occurs in the JE operation.protected com.sleepycat.je.OperationStatus read(com.sleepycat.je.Transaction txn, com.sleepycat.je.DatabaseEntry key, com.sleepycat.je.DatabaseEntry data, com.sleepycat.je.LockMode lockMode) throws com.sleepycat.je.DatabaseException
txn
- The JE transaction handle, or null if none.key
- The key of the record to be read.data
- The record value returned as output. Its byte array does not
need to be initialized by the caller.lockMode
- The JE locking mode to be used for the read.
com.sleepycat.je.DatabaseException
- If an error occurs in the JE operation.protected com.sleepycat.je.OperationStatus insert(com.sleepycat.je.Transaction txn, com.sleepycat.je.DatabaseEntry key, com.sleepycat.je.DatabaseEntry data) throws com.sleepycat.je.DatabaseException
txn
- The JE transaction handle, or null if none.key
- The record key.data
- The record value.
com.sleepycat.je.DatabaseException
- If an error occurs in the JE operation.protected com.sleepycat.je.OperationStatus delete(com.sleepycat.je.Transaction txn, com.sleepycat.je.DatabaseEntry key) throws com.sleepycat.je.DatabaseException
txn
- The JE transaction handle, or null if none.key
- The key of the record to be read.
com.sleepycat.je.DatabaseException
- If an error occurs in the JE operation.public com.sleepycat.je.Cursor openCursor(com.sleepycat.je.Transaction txn, com.sleepycat.je.CursorConfig cursorConfig) throws com.sleepycat.je.DatabaseException
txn
- A JE database transaction to be used by the cursor,
or null if none.cursorConfig
- The JE cursor configuration.
com.sleepycat.je.DatabaseException
- If an error occurs while attempting to open
the cursor.public long getRecordCount() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
- If an error occurs in the JE operation.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getName()
public com.sleepycat.je.PreloadStats preload(com.sleepycat.je.PreloadConfig config) throws com.sleepycat.je.DatabaseException
config
- The preload configuration.
com.sleepycat.je.DatabaseException
- If an JE database error occurs
during the preload.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |