public interface Transaction
OsidTransaction is used by an OsidSession
to provide transactions across its methods. Transactions are performed
within a session. Coordination of transactions across OSIDS of there
sessions requires the availability of a transaction manager.
A trsnaction is started upon creation of an OsidTransaction.
Actions within a session are queued until the transaction is
committed or aborted.
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Cancels this transaction, rolling back the queue of operations since
the start of this transaction.
|
void |
commit()
Commits the transaction and makes the state change(s) visible.
|
TransactionState |
getState()
Gets the current state of this transaction.
|
void |
prepare()
Prepares for a
commit . |
void prepare()
throws OperationFailedException,
PermissionDeniedException,
TransactionFailureException
commit . No further operations are
permitted in the associated manager until this transaction is
committed or aborted.IllegalStateException - this transaction has been
committed or abortedOperationFailedException - unable to complete requestPermissionDeniedException - authorization failureTransactionFailureException - this transaction cannot
proceed due to a bad transaction elementmandatory - This method must be implemented. The - provider must verify this transaction such that a
commit will succeed and reliably record the state
changes resulting from this transaction before returning. void commit()
throws OperationFailedException,
PermissionDeniedException
getState(). IllegalStateException - this transaction has been
committed or abortedOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. Any - resources allocated for this transaction can be released. void abort()
getState().
IllegalStateException - this transaction has been
committed or abortedmandatory - This method must be implemented. Any - resources allocated for this transaction can be released. TransactionState getState()
mandatory - This method must be implemented.