Package org.eclipse.emf.cdo.transaction
Interface CDOUserSavepoint
- All Superinterfaces:
CDORollbackable
- All Known Subinterfaces:
CDOSavepoint,CDOXASavepoint,InternalCDOSavepoint,InternalCDOUserSavepoint,InternalCDOXASavepoint
Creates a save point in a
CDOUserTransaction that can be used to roll back a part of the transaction.
Note: Save points do not flush to disk. Everything is done in memory on the client side.
- Since:
- 3.0
- Author:
- Simon McDuff
- No Implement
- This interface is not intended to be implemented by clients.
- No Extend
- This interface is not intended to be extended by clients.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the next savepoint in the transaction's savepoint sequence.intReturns this savepoint's sequence number.Returns the previous savepoint in the transaction's savepoint sequence.Returns the transaction that owns this savepoint.booleanisLast()Indicates whether this is the transaction's current last savepoint.booleanisValid()Indicates whether this savepoint can still be used.voidrollback()Rolls the owning transaction back to this savepoint while keeping the owning root transaction active.
-
Method Details
-
getTransaction
CDOUserTransaction getTransaction()Returns the transaction that owns this savepoint.- Returns:
- the owning transaction.
-
getNextSavepoint
CDOUserSavepoint getNextSavepoint()Returns the next savepoint in the transaction's savepoint sequence.- Returns:
- the next savepoint, or
null.
-
getPreviousSavepoint
CDOUserSavepoint getPreviousSavepoint()Returns the previous savepoint in the transaction's savepoint sequence.- Returns:
- the previous savepoint, or
null.
-
getNumber
int getNumber()Returns this savepoint's sequence number.- Returns:
- the savepoint number.
- Since:
- 4.1
-
isValid
boolean isValid()Indicates whether this savepoint can still be used.- Returns:
trueif the savepoint is valid.
-
isLast
boolean isLast()Indicates whether this is the transaction's current last savepoint.- Returns:
trueif this is the last savepoint.- Since:
- 4.30
-
rollback
void rollback()Rolls the owning transaction back to this savepoint while keeping the owning root transaction active. This restores only the changes made after this savepoint; it does not perform the lifecycle operation represented byCDOUserTransaction.rollback()and therefore does not finish the root transaction.- Specified by:
rollbackin interfaceCDORollbackable
-