|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atomikos.icatch.imp.AbstractCompositeTransaction
public abstract class AbstractCompositeTransaction
An abstract base implementation of CompositeTransaction, for common behaviour of both proxy and local instances.
| Field Summary | |
|---|---|
protected Stack |
lineage_
|
protected Properties |
properties_
|
protected boolean |
serial_
|
protected HeuristicMessage |
tag_
|
protected String |
tid_
|
| Constructor Summary | |
|---|---|
AbstractCompositeTransaction()
Required for externalization of subclasses |
|
AbstractCompositeTransaction(String tid,
Stack lineage,
boolean serial)
Constructor. |
|
| 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()
|
boolean |
equals(Object obj)
|
CompositeCoordinator |
getCompositeCoordinator()
|
Extent |
getExtent()
|
Stack |
getLineage()
|
int |
getLocalSubTxCount()
|
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()
|
int |
hashCode()
|
boolean |
isAncestorOf(CompositeTransaction ct)
|
boolean |
isDescendantOf(CompositeTransaction ct)
|
boolean |
isLocal()
|
boolean |
isRelatedTransaction(CompositeTransaction ct)
|
boolean |
isRoot()
|
boolean |
isSameTransaction(CompositeTransaction ct)
|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Stack lineage_
protected String tid_
protected boolean serial_
protected HeuristicMessage tag_
protected Properties properties_
| Constructor Detail |
|---|
public AbstractCompositeTransaction()
public AbstractCompositeTransaction(String tid,
Stack lineage,
boolean serial)
| Method Detail |
|---|
public String getTid()
getTid in interface CompositeTransactionCompositeTransaction.public void setTag(HeuristicMessage tag)
CompositeTransaction
setTag in interface CompositeTransactionCompositeTransaction.public boolean isSerial()
CompositeTransaction
isSerial in interface CompositeTransactionCompositeTransaction.public boolean isLocal()
isLocal in interface CompositeTransactionDefaults to false.
public TransactionControl getTransactionControl()
throws UnsupportedOperationException
getTransactionControl in interface CompositeTransactionUnsupportedOperationExceptionCompositeTransaction.
public RecoveryCoordinator addParticipant(Participant participant)
throws SysException,
IllegalStateException
addParticipant in interface CompositeTransactionSysException
IllegalStateExceptionCompositeTransaction
public void registerSynchronization(Synchronization sync)
throws IllegalStateException,
UnsupportedOperationException,
SysException
registerSynchronization in interface CompositeTransactionIllegalStateException
SysException
UnsupportedOperationExceptionCompositeTransactionpublic Stack getLineage()
getLineage in interface CompositeTransactionCompositeTransaction.public boolean isRoot()
isRoot in interface CompositeTransactionCompositeTransaction.public boolean isAncestorOf(CompositeTransaction ct)
isAncestorOf in interface CompositeTransactionCompositeTransaction.public boolean isDescendantOf(CompositeTransaction ct)
isDescendantOf in interface CompositeTransactionCompositeTransaction.public boolean isRelatedTransaction(CompositeTransaction ct)
isRelatedTransaction in interface CompositeTransactionCompositeTransaction.public boolean isSameTransaction(CompositeTransaction ct)
isSameTransaction in interface CompositeTransactionCompositeTransaction.public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
public CompositeCoordinator getCompositeCoordinator()
throws SysException,
UnsupportedOperationException
getCompositeCoordinator in interface CompositeTransactionSysException
UnsupportedOperationExceptionCompositeTransaction.
public void addSubTxAwareParticipant(SubTxAwareParticipant subtxaware)
throws SysException,
UnsupportedOperationException,
IllegalStateException
CompositeTransaction
addSubTxAwareParticipant in interface CompositeTransactionSysException
IllegalStateException
UnsupportedOperationExceptionCompositeTransaction
public CompositeTransaction createSubTransaction()
throws SysException,
IllegalStateException
createSubTransaction in interface CompositeTransactionSysException
IllegalStateExceptionCompositeTransaction.createSubTransaction()
public void setSerial()
throws IllegalStateException,
SysException
CompositeTransaction
setSerial in interface CompositeTransactionIllegalStateException
SysExceptionCompositeTransaction.setSerial()public int getLocalSubTxCount()
getLocalSubTxCount in interface CompositeTransactionCompositeTransaction.getLocalSubTxCount()public Extent getExtent()
getExtent in interface CompositeTransactionCompositeTransaction.getExtent()public long getTimeout()
getTimeout in interface CompositeTransactionCompositeTransaction.getTimeout()public void setRollbackOnly()
CompositeTransaction
setRollbackOnly in interface CompositeTransactionCompositeTransaction.setRollbackOnly()
public void commit()
throws HeurRollbackException,
HeurMixedException,
HeurHazardException,
SysException,
SecurityException,
RollbackException
CompositeTransaction
commit in interface CompositeTransactionHeurRollbackException - On heuristic rollback.
HeurMixedException - On heuristic mixed outcome.
HeurHazardException - In case of heuristic hazard.
SysException - For unexpected failures.
SecurityException - If calling thread does not have
right to commit.
RollbackException - If the transaction was rolled back
before prepare.CompositeTransaction.commit()
public void rollback()
throws IllegalStateException,
SysException
CompositeTransaction
rollback in interface CompositeTransactionIllegalStateException - If prepared or inactive.
SysException - If unexpected error.CompositeTransaction.rollback()
public void setProperty(String name,
String value)
CompositeTransaction
setProperty in interface CompositeTransactionpublic String getProperty(String name)
CompositeTransaction
getProperty in interface CompositeTransactionname - The name of the property.
public Properties getProperties()
CompositeTransaction
getProperties in interface CompositeTransactionpublic Object getState()
CompositeTransaction
getState in interface StatefulgetState in interface CompositeTransactioncom.atomikos.finitestates.Stateful.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||