|
||||||||||
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 CompositeTransaction
CompositeTransaction.
public void setTag(HeuristicMessage tag)
CompositeTransaction
setTag
in interface CompositeTransaction
CompositeTransaction.
public boolean isSerial()
CompositeTransaction
isSerial
in interface CompositeTransaction
CompositeTransaction.
public boolean isLocal()
isLocal
in interface CompositeTransaction
Defaults to false.
public TransactionControl getTransactionControl() throws UnsupportedOperationException
getTransactionControl
in interface CompositeTransaction
UnsupportedOperationException
CompositeTransaction.
public RecoveryCoordinator addParticipant(Participant participant) throws SysException, IllegalStateException
addParticipant
in interface CompositeTransaction
SysException
IllegalStateException
CompositeTransaction
public void registerSynchronization(Synchronization sync) throws IllegalStateException, UnsupportedOperationException, SysException
registerSynchronization
in interface CompositeTransaction
IllegalStateException
SysException
UnsupportedOperationException
CompositeTransaction
public Stack getLineage()
getLineage
in interface CompositeTransaction
CompositeTransaction.
public boolean isRoot()
isRoot
in interface CompositeTransaction
CompositeTransaction.
public boolean isAncestorOf(CompositeTransaction ct)
isAncestorOf
in interface CompositeTransaction
CompositeTransaction.
public boolean isDescendantOf(CompositeTransaction ct)
isDescendantOf
in interface CompositeTransaction
CompositeTransaction.
public boolean isRelatedTransaction(CompositeTransaction ct)
isRelatedTransaction
in interface CompositeTransaction
CompositeTransaction.
public boolean isSameTransaction(CompositeTransaction ct)
isSameTransaction
in interface CompositeTransaction
CompositeTransaction.
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public CompositeCoordinator getCompositeCoordinator() throws SysException, UnsupportedOperationException
getCompositeCoordinator
in interface CompositeTransaction
SysException
UnsupportedOperationException
CompositeTransaction.
public void addSubTxAwareParticipant(SubTxAwareParticipant subtxaware) throws SysException, UnsupportedOperationException, IllegalStateException
CompositeTransaction
addSubTxAwareParticipant
in interface CompositeTransaction
SysException
IllegalStateException
UnsupportedOperationException
CompositeTransaction
public CompositeTransaction createSubTransaction() throws SysException, IllegalStateException
createSubTransaction
in interface CompositeTransaction
SysException
IllegalStateException
CompositeTransaction.createSubTransaction()
public void setSerial() throws IllegalStateException, SysException
CompositeTransaction
setSerial
in interface CompositeTransaction
IllegalStateException
SysException
CompositeTransaction.setSerial()
public int getLocalSubTxCount()
getLocalSubTxCount
in interface CompositeTransaction
CompositeTransaction.getLocalSubTxCount()
public Extent getExtent()
getExtent
in interface CompositeTransaction
CompositeTransaction.getExtent()
public long getTimeout()
getTimeout
in interface CompositeTransaction
CompositeTransaction.getTimeout()
public void setRollbackOnly()
CompositeTransaction
setRollbackOnly
in interface CompositeTransaction
CompositeTransaction.setRollbackOnly()
public void commit() throws HeurRollbackException, HeurMixedException, HeurHazardException, SysException, SecurityException, RollbackException
CompositeTransaction
commit
in interface CompositeTransaction
HeurRollbackException
- 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 CompositeTransaction
IllegalStateException
- If prepared or inactive.
SysException
- If unexpected error.CompositeTransaction.rollback()
public void setProperty(String name, String value)
CompositeTransaction
setProperty
in interface CompositeTransaction
public String getProperty(String name)
CompositeTransaction
getProperty
in interface CompositeTransaction
name
- The name of the property.
public Properties getProperties()
CompositeTransaction
getProperties
in interface CompositeTransaction
public Object getState()
CompositeTransaction
getState
in interface Stateful
getState
in interface CompositeTransaction
com.atomikos.finitestates.Stateful.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |