|
Berkeley DB Java Edition version 1.7.1 |
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use Transaction | |
com.sleepycat.collections | Data access based on the standard Java collections API. |
com.sleepycat.je | Foundation for creating environments, databases and transactions; provides cursor based data access. |
Uses of Transaction in com.sleepycat.collections |
Methods in com.sleepycat.collections that return Transaction | |
Transaction |
CurrentTransaction.getTransaction()
Returns the transaction associated with the current thread for this environment, or null if no transaction is active. |
Transaction |
CurrentTransaction.beginTransaction(TransactionConfig config)
Begins a new transaction for this environment and associates it with the current thread. |
Transaction |
CurrentTransaction.commitTransaction()
Commits the transaction that is active for the current thread for this environment and makes the parent transaction (if any) the current transaction. |
Transaction |
CurrentTransaction.abortTransaction()
Aborts the transaction that is active for the current thread for this environment and makes the parent transaction (if any) the current transaction. |
Uses of Transaction in com.sleepycat.je |
Methods in com.sleepycat.je that return Transaction | |
Transaction |
Environment.beginTransaction(Transaction parent,
TransactionConfig txnConfig)
Create a new transaction in the database environment. |
Methods in com.sleepycat.je with parameters of type Transaction | |
OperationStatus |
SecondaryDatabase.get(Transaction txn,
DatabaseEntry key,
DatabaseEntry pKey,
DatabaseEntry data,
LockMode lockMode)
Retrieves the key/data pair with the given key. |
OperationStatus |
SecondaryDatabase.getSearchBoth(Transaction txn,
DatabaseEntry key,
DatabaseEntry pKey,
DatabaseEntry data,
LockMode lockMode)
Retrieves the key/data pair with the specified secondary and primary key, that is, both the primary and secondary key items must match. |
SecondaryCursor |
SecondaryDatabase.openSecondaryCursor(Transaction txn,
CursorConfig cursorConfig)
Obtain a cursor on a database, returning a SecondaryCursor . |
OperationStatus |
SecondaryDatabase.delete(Transaction txn,
DatabaseEntry key)
Deletes the key/data pair from the associated primary database and all secondary indices. |
OperationStatus |
SecondaryDatabase.get(Transaction txn,
DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Retrieves the key/data pair with the given key. |
OperationStatus |
SecondaryDatabase.getSearchBoth(Transaction txn,
DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
This operation is not allowed with this method signature. |
OperationStatus |
SecondaryDatabase.put(Transaction txn,
DatabaseEntry key,
DatabaseEntry data)
This operation is not allowed on a secondary database. |
OperationStatus |
SecondaryDatabase.putNoOverwrite(Transaction txn,
DatabaseEntry key,
DatabaseEntry data)
This operation is not allowed on a secondary database. |
OperationStatus |
SecondaryDatabase.putNoDupData(Transaction txn,
DatabaseEntry key,
DatabaseEntry data)
This operation is not allowed on a secondary database. |
int |
SecondaryDatabase.truncate(Transaction txn,
boolean countRecords)
This operation is not allowed on a secondary database. |
Transaction |
Environment.beginTransaction(Transaction parent,
TransactionConfig txnConfig)
Create a new transaction in the database environment. |
Database |
Environment.openDatabase(Transaction txn,
String databaseName,
DatabaseConfig dbConfig)
Open, and optionally create, a Database . |
SecondaryDatabase |
Environment.openSecondaryDatabase(Transaction txn,
String databaseName,
Database primaryDatabase,
SecondaryConfig secConfig)
Open and optionally create a SecondaryDatabase . |
void |
Environment.removeDatabase(Transaction txn,
String databaseName)
Remove a database. |
void |
Environment.renameDatabase(Transaction txn,
String databaseName,
String newName)
Rename a database. |
long |
Environment.truncateDatabase(Transaction txn,
String databaseName,
boolean returnCount)
Empty the database, discarding all records it contains. |
OperationStatus |
Database.delete(Transaction txn,
DatabaseEntry key)
Remove key/data pairs from the database. |
OperationStatus |
Database.get(Transaction txn,
DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Retrieves the key/data pair with the given key. |
OperationStatus |
Database.getSearchBoth(Transaction txn,
DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Retrieves the key/data pair with the given key and data value, that is, both the key and data items must match. |
OperationStatus |
Database.put(Transaction txn,
DatabaseEntry key,
DatabaseEntry data)
Store the key/data pair into the database. |
OperationStatus |
Database.putNoOverwrite(Transaction txn,
DatabaseEntry key,
DatabaseEntry data)
Store the key/data pair into the database if the key does not already appear in the database. |
OperationStatus |
Database.putNoDupData(Transaction txn,
DatabaseEntry key,
DatabaseEntry data)
Store the key/data pair into the database if it does not already appear in the database. |
Cursor |
Database.openCursor(Transaction txn,
CursorConfig cursorConfig)
Return a cursor into the database. |
int |
Database.truncate(Transaction txn,
boolean returnCount)
Deprecated. As of JE 1.7, replaced by Environment.truncateDatabase(Transaction, String, boolean) .
The Database class is thread safe and may be used concurrently by multiple threads, using multiple transactions. It was not possible to supply correct transactional semantics for this method in all cases without imposing a performance penalty on all operations. Specifically, a truncate operation executed within one transaction can be incorrectly seen before commit by other transactions if those later transactions use the same Database handle. The replacement method, Environment.truncateDatabase(), avoids these issues because all Database handles must be closed before the truncateDatabase() method is called. |
|
Berkeley DB Java Edition version 1.7.1 |
||||||||||
PREV NEXT | FRAMES NO FRAMES |