public interface CompositeTransaction
| Modifier and Type | Method and Description |
|---|---|
RecoveryCoordinator |
addParticipant(Participant participant) |
void |
addSubTxAwareParticipant(SubTxAwareParticipant subtxaware)
Resources that support lock inheritance can use this feature
to be notified whenever a lock should be inherited.
|
void |
commit()
Commits the composite transaction.
|
CompositeTransaction |
createSubTransaction() |
CompositeCoordinator |
getCompositeCoordinator() |
Extent |
getExtent() |
java.util.Stack<CompositeTransaction> |
getLineage() |
int |
getLocalSubTxCount() |
java.util.Properties |
getProperties()
Gets all properties of this instance.
|
java.lang.String |
getProperty(java.lang.String name)
Gets the specified metadata property.
|
TxState |
getState()
Gets the current state.
|
java.lang.String |
getTid() |
long |
getTimeout() |
boolean |
isAncestorOf(CompositeTransaction otherCompositeTransaction) |
boolean |
isDescendantOf(CompositeTransaction otherCompositeTransaction) |
boolean |
isLocal() |
boolean |
isRelatedTransaction(CompositeTransaction otherCompositeTransaction) |
boolean |
isRoot() |
boolean |
isSameTransaction(CompositeTransaction otherCompositeTransaction) |
boolean |
isSerial()
Serial mode is an optimized way for lock inheritance:
no locks among related transactions are necessary if all related
transactions are executed serially with respect to each other.
|
void |
registerSynchronization(Synchronization sync) |
void |
rollback()
Rollback of the current transaction.
|
void |
setProperty(java.lang.String name,
java.lang.String value)
Sets metadata property information on the transaction object.
|
void |
setRollbackOnly()
Marks the transaction so that the only possible
termination is rollback.
|
void |
setSerial()
Set serial mode for root.
|
TxState getState()
TxStateboolean isRoot()
java.util.Stack<CompositeTransaction> getLineage()
java.lang.String getTid()
boolean isAncestorOf(CompositeTransaction otherCompositeTransaction)
otherCompositeTransaction - boolean isDescendantOf(CompositeTransaction otherCompositeTransaction)
otherCompositeTransaction - boolean isRelatedTransaction(CompositeTransaction otherCompositeTransaction)
otherCompositeTransaction - boolean isSameTransaction(CompositeTransaction otherCompositeTransaction)
otherCompositeTransaction - CompositeCoordinator getCompositeCoordinator() throws SysException
SysExceptionRecoveryCoordinator addParticipant(Participant participant) throws SysException, java.lang.IllegalStateException
participant - SysExceptionjava.lang.IllegalStateExceptionvoid registerSynchronization(Synchronization sync) throws java.lang.IllegalStateException, SysException
sync - java.lang.IllegalStateExceptionSysExceptionvoid addSubTxAwareParticipant(SubTxAwareParticipant subtxaware) throws SysException, java.lang.IllegalStateException
subtxaware - SysExceptionjava.lang.IllegalStateExceptionboolean isSerial()
boolean isLocal()
Extent getExtent()
long getTimeout()
void setRollbackOnly()
void commit()
throws HeurRollbackException,
HeurMixedException,
HeurHazardException,
SysException,
java.lang.SecurityException,
RollbackException
HeurRollbackException - On heuristic rollback.HeurMixedException - On heuristic mixed outcome.SysException - For unexpected failures.java.lang.SecurityException - If calling thread does not have
right to commit.HeurHazardException - In case of heuristic hazard.RollbackException - If the transaction was rolled back
before prepare.void rollback()
throws java.lang.IllegalStateException,
SysException
java.lang.IllegalStateException - If prepared or inactive.SysException - If unexpected error.void setProperty(java.lang.String name,
java.lang.String value)
name - value - java.lang.String getProperty(java.lang.String name)
name - The name of the property.java.util.Properties getProperties()
CompositeTransaction createSubTransaction()
void setSerial()
throws java.lang.IllegalStateException,
SysException
java.lang.IllegalStateException - If called for non-root tx.SysException - For unexpected errors.int getLocalSubTxCount()
Copyright © 2018. All Rights Reserved.