Method Summary |
|
final public Transaction | abortTransaction() Aborts the transaction that is active for the current thread for this
environment and makes the parent transaction (if any) the current
transaction. |
final public Transaction | beginTransaction(TransactionConfig config) Begins a new transaction for this environment and associates it with
the current thread. |
void | closeCursor(Cursor cursor) Closes a cursor. |
final public Transaction | commitTransaction() Commits the transaction that is active for the current thread for this
environment and makes the parent transaction (if any) the current
transaction. |
Cursor | dupCursor(Cursor cursor, boolean writeCursor, boolean samePosition) Duplicates a cursor for a given database.
Parameters: writeCursor - true to open a write cursor in a CDB environment, andignored for other environments. Parameters: samePosition - is passed through to Cursor.dup(). |
final public Environment | getEnvironment() Returns the underlying Berkeley DB environment. |
public static CurrentTransaction | getInstance(Environment env) Gets the CurrentTransaction accessor for a specified Berkeley DB
environment. |
static CurrentTransaction | getInstanceInternal(Environment env) Gets the CurrentTransaction accessor for a specified Berkeley DB
environment. |
final public Transaction | getTransaction() Returns the transaction associated with the current thread for this
environment, or null if no transaction is active. |
final LockMode | getWriteLockMode() Return the LockMode.RMW or null, depending on whether locking is
enabled. |
boolean | isAutoCommitAllowed() Returns whether auto-commit may be performed by the collections API. |
boolean | isCDBCursorOpen(Database db) Returns true if a CDB cursor is open and therefore a Database write
operation should not be attempted since a self-deadlock may result. |
final boolean | isCdbMode() Returns whether this is a Concurrent Data Store environment. |
final boolean | isLockingMode() Returns whether environment is configured for locking. |
final boolean | isReadUncommitted() Returns whether the current transaction is a readUncommitted
transaction. |
final boolean | isTxnMode() Returns whether this is a transactional environment. |
Cursor | openCursor(Database db, CursorConfig cursorConfig, boolean writeCursor, Transaction txn) Opens a cursor for a given database, dup'ing an existing CDB cursor if
one is open for the current thread. |