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() |
Stack<CompositeTransaction> |
getLineage() |
Properties |
getProperties()
Gets all properties of this instance.
|
String |
getProperty(String name)
Gets the specified metadata property.
|
TxState |
getState()
Gets the current state.
|
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(String name,
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()
Stack<CompositeTransaction> getLineage()
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, IllegalStateException
participant - SysExceptionIllegalStateExceptionvoid registerSynchronization(Synchronization sync) throws IllegalStateException, SysException
sync - IllegalStateExceptionSysExceptionvoid addSubTxAwareParticipant(SubTxAwareParticipant subtxaware) throws SysException, IllegalStateException
subtxaware - SysExceptionIllegalStateExceptionboolean isSerial()
boolean isLocal()
Extent getExtent()
long getTimeout()
void setRollbackOnly()
void commit()
throws HeurMixedException,
HeurHazardException,
SysException,
SecurityException,
RollbackException
HeurMixedException - On heuristic mixed outcome.SysException - For unexpected failures.SecurityException - If calling thread does not have
right to commit.HeurHazardException - In case of heuristic hazard.RollbackException - If the transaction was rolled back.void rollback()
throws IllegalStateException,
SysException
IllegalStateException - If prepared or inactive.SysException - If unexpected error.void setProperty(String name, String value)
name - value - String getProperty(String name)
name - The name of the property.Properties getProperties()
CompositeTransaction createSubTransaction()
void setSerial()
throws IllegalStateException,
SysException
IllegalStateException - If called for non-root tx.SysException - For unexpected errors.Copyright © 2022. All rights reserved.