|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CompositeTransaction
Represents 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)
|
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 |
getLineage()
|
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()
Gets the current state. |
String |
getTid()
|
long |
getTimeout()
|
TransactionControl |
getTransactionControl()
Deprecated. As from release 3.0, the methods in the TransactionControl interface have been moved to this one. |
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()
Sets the serial mode. |
void |
setTag(HeuristicMessage tag)
Sets the tag for this transaction. |
Method Detail |
---|
Object getState()
getState
in interface Stateful
TxState
boolean isRoot()
Stack 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
SysException
RecoveryCoordinator addParticipant(Participant participant) throws SysException, IllegalStateException
participant
-
SysException
IllegalStateException
void registerSynchronization(Synchronization sync) throws IllegalStateException, SysException
sync
-
IllegalStateException
SysException
void addSubTxAwareParticipant(SubTxAwareParticipant subtxaware) throws SysException, IllegalStateException
subtxaware
-
SysException
IllegalStateException
boolean isSerial()
TransactionControl getTransactionControl()
boolean isLocal()
CompositeTransaction createSubTransaction() throws SysException, IllegalStateException
SysException
IllegalStateException
void setSerial() throws IllegalStateException, SysException
IllegalStateException
SysException
int getLocalSubTxCount()
void setTag(HeuristicMessage tag)
tag
- 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 |