org.apache.derby.iapi.transaction
Class TransactionControl
- java.lang.Object
-
- org.apache.derby.iapi.transaction.TransactionControl
-
public final class TransactionControl extends java.lang.ObjectProvide support to transactions to manage sets of actions to perform at transaction boundaries.Add rollback of savepoints? TODO: A
-
-
Field Summary
Fields Modifier and Type Field and Description static intREAD_COMMITTED_ISOLATION_LEVELstatic intREAD_UNCOMMITTED_ISOLATION_LEVELstatic intREPEATABLE_READ_ISOLATION_LEVELstatic intSERIALIZABLE_ISOLATION_LEVELstatic intUNSPECIFIED_ISOLATION_LEVEL
-
Constructor Summary
Constructors Constructor and Description TransactionControl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddListener(TransactionListener listener)Add a listener to the curent transaction.static intisolationMapCount()Get number of isolation string mappingsstatic java.lang.String[]isolationTextNames(int derbyIsolationLevel)Map Derby isolation level to SQL text valuesstatic intjdbcIsolationLevel(int derbyIsolationLevel)Map a Derby isolation level to the corresponding JDBC levelvoidpreCommitNotify()Notify all listeners that a commit is about to occur.voidpreRollbackNotify()Notify all listeners that a rollback is about to occur.voidremoveListener(TransactionListener listener)Remove a listener from the current transaction.
-
-
-
Field Detail
-
UNSPECIFIED_ISOLATION_LEVEL
public static final int UNSPECIFIED_ISOLATION_LEVEL
- See Also:
- Constant Field Values
-
READ_UNCOMMITTED_ISOLATION_LEVEL
public static final int READ_UNCOMMITTED_ISOLATION_LEVEL
- See Also:
- Constant Field Values
-
READ_COMMITTED_ISOLATION_LEVEL
public static final int READ_COMMITTED_ISOLATION_LEVEL
- See Also:
- Constant Field Values
-
REPEATABLE_READ_ISOLATION_LEVEL
public static final int REPEATABLE_READ_ISOLATION_LEVEL
- See Also:
- Constant Field Values
-
SERIALIZABLE_ISOLATION_LEVEL
public static final int SERIALIZABLE_ISOLATION_LEVEL
- See Also:
- Constant Field Values
-
-
Method Detail
-
jdbcIsolationLevel
public static int jdbcIsolationLevel(int derbyIsolationLevel)
Map a Derby isolation level to the corresponding JDBC level
-
isolationTextNames
public static java.lang.String[] isolationTextNames(int derbyIsolationLevel)
Map Derby isolation level to SQL text values
-
isolationMapCount
public static int isolationMapCount()
Get number of isolation string mappings
-
addListener
public void addListener(TransactionListener listener)
Add a listener to the curent transaction. A listener may be added multiple times and it will receive multiple callbacks.
-
removeListener
public void removeListener(TransactionListener listener)
Remove a listener from the current transaction.
-
preCommitNotify
public void preCommitNotify() throws StandardExceptionNotify all listeners that a commit is about to occur. If a listener throws an exception then no further listeners will be notified and a StandardException with rollback severity will be thrown.- Throws:
StandardException
-
preRollbackNotify
public void preRollbackNotify() throws StandardExceptionNotify all listeners that a rollback is about to occur. If a listener throws an exception then no further listeners will be notified and a StandardException with shutdown database(?) severity will be thrown.- Throws:
StandardException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG