public abstract class DatabaseContainer extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
protected com.sleepycat.je.DatabaseConfig |
dbConfig
The JE database configuration.
|
protected EntryContainer |
entryContainer
The database entryContainer.
|
protected String |
name
The name of the database within the entryContainer.
|
Modifier | Constructor and Description |
---|---|
protected |
DatabaseContainer(String name,
com.sleepycat.je.Environment env,
EntryContainer entryContainer)
Create a new DatabaseContainer object.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Flush any cached database information to disk and close the
database container.
|
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.
|
void |
open()
Opens a JE database in this database container.
|
com.sleepycat.je.DiskOrderedCursor |
openCursor(com.sleepycat.je.DiskOrderedCursorConfig cursorConfig)
Open a JE disk ordered cursor on the JE database.
|
com.sleepycat.je.Cursor |
openCursor(com.sleepycat.je.Transaction txn,
com.sleepycat.je.CursorConfig cursorConfig)
Open a JE cursor on the JE database.
|
com.sleepycat.je.PreloadStats |
preload(com.sleepycat.je.PreloadConfig config)
Preload the database into cache.
|
String |
toString()
Get a string representation of this object.
|
protected final EntryContainer entryContainer
protected com.sleepycat.je.DatabaseConfig dbConfig
protected DatabaseContainer(String name, com.sleepycat.je.Environment env, EntryContainer entryContainer)
name
- The name of the entry database.env
- The JE Environment.entryContainer
- The entryContainer of the entry database.public void open() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
- if a JE database error occurs while
opening the index.public void close() throws com.sleepycat.je.DatabaseException
close
in interface Closeable
close
in interface AutoCloseable
com.sleepycat.je.DatabaseException
- if an error occurs.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 com.sleepycat.je.DiskOrderedCursor openCursor(com.sleepycat.je.DiskOrderedCursorConfig cursorConfig) throws com.sleepycat.je.DatabaseException
cursorConfig
- The JE disk ordered 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 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.Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.