public class Database
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
Database(Environment env)
Creates a database but does not open or fully initialize it.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
long |
count() |
OperationStatus |
delete(Transaction txn,
DatabaseEntry key) |
OperationStatus |
get(Transaction txn,
DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode) |
DatabaseConfig |
getConfig() |
java.lang.String |
getDatabaseName() |
Environment |
getEnvironment() |
OperationStatus |
getSearchBoth(Transaction txn,
DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode) |
java.util.List |
getSecondaryDatabases() |
DatabaseStats |
getStats(StatsConfig config) |
JoinCursor |
join(Cursor[] cursors,
JoinConfig config) |
Cursor |
openCursor(Transaction txn,
CursorConfig cursorConfig) |
Sequence |
openSequence(Transaction txn,
DatabaseEntry key,
SequenceConfig config)
Javadoc for this public method is generated via
the doc templates in the doc_src directory.
|
void |
preload(long maxBytes) |
void |
preload(long maxBytes,
long maxMillisecs) |
PreloadStats |
preload(PreloadConfig config) |
OperationStatus |
put(Transaction txn,
DatabaseEntry key,
DatabaseEntry data) |
OperationStatus |
putNoDupData(Transaction txn,
DatabaseEntry key,
DatabaseEntry data) |
OperationStatus |
putNoOverwrite(Transaction txn,
DatabaseEntry key,
DatabaseEntry data) |
void |
removeSequence(Transaction txn,
DatabaseEntry key)
Javadoc for this public method is generated via
the doc templates in the doc_src directory.
|
void |
sync()
Javadoc for this public method is generated via
the doc templates in the doc_src directory.
|
int |
truncate(Transaction txn,
boolean countRecords)
Deprecated.
It has not been possible to implement this method with
correct transactional semantics without incurring a performance penalty
on all Database operations. Truncate functionality has been moved to
Environment.truncateDatabase(), which requires that all Database handles
on the database are closed before the truncate operation can execute.
|
DatabaseStats |
verify(VerifyConfig config) |
protected Database(Environment env)
public void close() throws DatabaseException
DatabaseException
public void sync() throws DatabaseException
DatabaseException
public Sequence openSequence(Transaction txn, DatabaseEntry key, SequenceConfig config) throws DatabaseException
DatabaseException
public void removeSequence(Transaction txn, DatabaseEntry key) throws DatabaseException
DatabaseException
public Cursor openCursor(Transaction txn, CursorConfig cursorConfig) throws DatabaseException
DatabaseException
public OperationStatus delete(Transaction txn, DatabaseEntry key) throws DatabaseException
DatabaseException
public OperationStatus get(Transaction txn, DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
public OperationStatus getSearchBoth(Transaction txn, DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
public OperationStatus put(Transaction txn, DatabaseEntry key, DatabaseEntry data) throws DatabaseException
DatabaseException
public OperationStatus putNoOverwrite(Transaction txn, DatabaseEntry key, DatabaseEntry data) throws DatabaseException
DatabaseException
public OperationStatus putNoDupData(Transaction txn, DatabaseEntry key, DatabaseEntry data) throws DatabaseException
DatabaseException
public JoinCursor join(Cursor[] cursors, JoinConfig config) throws DatabaseException
DatabaseException
public int truncate(Transaction txn, boolean countRecords) throws DatabaseException
DatabaseException
public void preload(long maxBytes) throws DatabaseException
DatabaseException
public void preload(long maxBytes, long maxMillisecs) throws DatabaseException
DatabaseException
public PreloadStats preload(PreloadConfig config) throws DatabaseException
DatabaseException
public long count() throws DatabaseException
DatabaseException
public DatabaseStats getStats(StatsConfig config) throws DatabaseException
DatabaseException
public DatabaseStats verify(VerifyConfig config) throws DatabaseException
DatabaseException
public java.lang.String getDatabaseName() throws DatabaseException
DatabaseException
public DatabaseConfig getConfig() throws DatabaseException
DatabaseException
public Environment getEnvironment() throws DatabaseException
DatabaseException
public java.util.List getSecondaryDatabases() throws DatabaseException
DatabaseException