|
Berkeley DB Java Edition version 2.0.90 |
|||||||||
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.abortTransaction()
Aborts the transaction that is active for the current thread for this environment and makes the parent transaction (if any) the current transaction. |
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.getTransaction()
Returns the transaction associated with the current thread for this environment, or null if no transaction is active. |
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. |
Transaction |
Environment.getThreadTransaction()
Returns the transaction associated with this thread if implied transactions are being used. |
Transaction |
XAEnvironment.getXATransaction(Xid xid)
This method can be used by the application to get the Transaction object given an XA Xid. |
Methods in com.sleepycat.je with parameters of type Transaction | |
---|---|
Transaction |
Environment.beginTransaction(Transaction parent,
TransactionConfig txnConfig)
Create a new transaction in the database environment. |
OperationStatus |
SecondaryDatabase.delete(Transaction txn,
DatabaseEntry key)
Deletes the key/data pair from the associated primary database and all secondary indices. |
OperationStatus |
Database.delete(Transaction txn,
DatabaseEntry key)
Remove key/data pairs from the database. |
OperationStatus |
SecondaryDatabase.get(Transaction txn,
DatabaseEntry key,
DatabaseEntry pKey,
DatabaseEntry data,
LockMode lockMode)
Retrieves the key/data pair with the given key. |
OperationStatus |
SecondaryDatabase.get(Transaction txn,
DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Retrieves the key/data pair with the given key. |
OperationStatus |
Database.get(Transaction txn,
DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Retrieves the key/data pair with the given key. |
long |
Sequence.get(Transaction txn,
int delta)
Return the next available element in the sequence and changes the sequence value by delta . |
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. |
OperationStatus |
SecondaryDatabase.getSearchBoth(Transaction txn,
DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
This operation is not allowed with this method signature. |
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. |
Cursor |
Database.openCursor(Transaction txn,
CursorConfig cursorConfig)
Return a cursor into the database. |
Database |
Environment.openDatabase(Transaction txn,
String databaseName,
DatabaseConfig dbConfig)
Open, and optionally create, a Database . |
SecondaryCursor |
SecondaryDatabase.openSecondaryCursor(Transaction txn,
CursorConfig cursorConfig)
Obtain a cursor on a database, returning a SecondaryCursor . |
SecondaryDatabase |
Environment.openSecondaryDatabase(Transaction txn,
String databaseName,
Database primaryDatabase,
SecondaryConfig secConfig)
Open and optionally create a SecondaryDatabase . |
Sequence |
Database.openSequence(Transaction txn,
DatabaseEntry key,
SequenceConfig sequenceConfig)
Open a sequence in the database. |
OperationStatus |
SecondaryDatabase.put(Transaction txn,
DatabaseEntry key,
DatabaseEntry data)
This operation is not allowed on a secondary database. |
OperationStatus |
Database.put(Transaction txn,
DatabaseEntry key,
DatabaseEntry data)
Store the key/data pair into the database. |
OperationStatus |
SecondaryDatabase.putNoDupData(Transaction txn,
DatabaseEntry key,
DatabaseEntry data)
This operation is not allowed on a secondary 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. |
OperationStatus |
SecondaryDatabase.putNoOverwrite(Transaction txn,
DatabaseEntry key,
DatabaseEntry data)
This operation is not allowed on a secondary 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. |
void |
Environment.removeDatabase(Transaction txn,
String databaseName)
Remove a database. |
void |
Database.removeSequence(Transaction txn,
DatabaseEntry key)
Remove the sequence from the database. |
void |
Environment.renameDatabase(Transaction txn,
String databaseName,
String newName)
Rename a database. |
void |
Environment.setThreadTransaction(Transaction txn)
Sets the transaction associated with this thread if implied transactions are being used. |
void |
XAEnvironment.setXATransaction(Xid xid,
Transaction txn)
This method can be used by the application to set the Transaction object for an XA Xid. |
int |
SecondaryDatabase.truncate(Transaction txn,
boolean countRecords)
This operation is not allowed on a secondary 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. |
long |
Environment.truncateDatabase(Transaction txn,
String databaseName,
boolean returnCount)
Empty the database, discarding all records it contains. |
|
Berkeley DB Java Edition version 2.0.90 |
|||||||||
PREV NEXT | FRAMES NO FRAMES |