|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CompositeTransaction
A composite transaction is a nested part of a global composite transaction. Each invocation of a server is represented by an instance of this type. For transaction proxies (instances that represent non-local transactions), all non-trivial methods are allowed to generate an exception of type UnsupportedOperationException. The only methods that always work for all instances are the simple getters and test methods.
| Method Summary | |
|---|---|
RecoveryCoordinator |
addParticipant(Participant participant)
Add a new participant. |
void |
addSubTxAwareParticipant(SubTxAwareParticipant subtxaware)
Register a participant on behalf of a subtransaction, to be notified as soon as the locally finished state is reached. |
void |
commit()
Commit the composite transaction. |
CompositeTransaction |
createSubTransaction()
Create a subtx for this transaction. |
CompositeCoordinator |
getCompositeCoordinator()
Get the coordinator for this tx. |
Extent |
getExtent()
Get the extent for the transaction. |
Stack |
getLineage()
Get the ancestor info. |
int |
getLocalSubTxCount()
Deprecated. This should not matter outside the core. |
Properties |
getProperties()
Gets all properties of this instance. |
String |
getProperty(String name)
Gets the specified metadata property. |
Object |
getState()
Get the current state. |
String |
getTid()
Getter for tid. |
long |
getTimeout()
Get the timeout in ms. |
TransactionControl |
getTransactionControl()
Deprecated. As from release 3.0, the methods in the TransactionControl interface have been moved to this one. |
boolean |
isAncestorOf(CompositeTransaction ct)
Test if this instance is an ancestor of ct. |
boolean |
isDescendantOf(CompositeTransaction ct)
Test if this instance is a descendant of ct. |
boolean |
isLocal()
Test if the transaction is a locally started transaction or not. |
boolean |
isRelatedTransaction(CompositeTransaction ct)
Test if this instance is related to ct. |
boolean |
isRoot()
Test if this instance is a root or not. |
boolean |
isSameTransaction(CompositeTransaction ct)
Test if this intance represents the same transaction as ct. |
boolean |
isSerial()
Test if serial tx or not. |
void |
registerSynchronization(Synchronization sync)
Add a synchronization callback. |
void |
rollback()
Rollback 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. |
void |
setTag(HeuristicMessage tag)
Sets the tag for this transaction. |
| Method Detail |
|---|
Object getState()
getState in interface StatefulTxStateboolean isRoot()
Stack getLineage()
String getTid()
boolean isAncestorOf(CompositeTransaction ct)
ct - The argument to test for ancestor.
boolean isDescendantOf(CompositeTransaction ct)
ct - The argument to test for descendant.
boolean isRelatedTransaction(CompositeTransaction ct)
boolean isSameTransaction(CompositeTransaction ct)
CompositeCoordinator getCompositeCoordinator()
throws SysException
SysException - On failure.
RecoveryCoordinator addParticipant(Participant participant)
throws SysException,
IllegalStateException
participant - The participant to add.
SysException - Unexpected.
IllegalStateException - Illegal state.
void registerSynchronization(Synchronization sync)
throws IllegalStateException,
SysException
sync - The callback object.
IllegalStateException - If no tx longer active.
SysException - Unexptected failure.
void addSubTxAwareParticipant(SubTxAwareParticipant subtxaware)
throws SysException,
IllegalStateException
subtxaware - The participant to be notified
on local termination.
IllegalStateException - If no longer active.
SysExceptionboolean isSerial()
TransactionControl getTransactionControl()
boolean isLocal()
CompositeTransaction createSubTransaction()
throws SysException,
IllegalStateException
IllegalStateException - If no longer active.
SysException
void setSerial()
throws IllegalStateException,
SysException
IllegalStateException - If called for non-root tx.
SysException - For unexpected errors.int getLocalSubTxCount()
void setTag(HeuristicMessage tag)
tag - The tag to add to the transaction.Extent getExtent()
long getTimeout()
void setRollbackOnly()
void commit()
throws HeurRollbackException,
HeurMixedException,
HeurHazardException,
SysException,
SecurityException,
RollbackException
HeurRollbackException - On heuristic rollback.
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
before prepare.
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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||