org.codehaus.activemq.service.impl
Class AbstractTransaction
java.lang.Object
org.codehaus.activemq.service.impl.AbstractTransaction
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable, Transaction
- Direct Known Subclasses:
- XATransactionCommand
- public abstract class AbstractTransaction
- extends java.lang.Object
- implements Transaction, java.io.Externalizable
Keeps track of all the actions the need to be done when
a transaction does a commit or rollback.
- Version:
- $Revision: 1.4 $
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
START_STATE
public static final byte START_STATE
- See Also:
- Constant Field Values
IN_USE_STATE
public static final byte IN_USE_STATE
- See Also:
- Constant Field Values
PREPARED_STATE
public static final byte PREPARED_STATE
- See Also:
- Constant Field Values
FINISHED_STATE
public static final byte FINISHED_STATE
- See Also:
- Constant Field Values
AbstractTransaction
protected AbstractTransaction(Broker broker)
getBroker
public Broker getBroker()
setBroker
public void setBroker(Broker broker)
- Called after deserialization to register the broker
- Specified by:
setBroker
in interface Transaction
- Parameters:
broker
-
getState
public byte getState()
setState
public void setState(byte state)
addPostCommitTask
public void addPostCommitTask(TransactionTask r)
- Specified by:
addPostCommitTask
in interface Transaction
addPostRollbackTask
public void addPostRollbackTask(TransactionTask r)
- Specified by:
addPostRollbackTask
in interface Transaction
addPrePrepareTask
public void addPrePrepareTask(TransactionTask r)
- Specified by:
addPrePrepareTask
in interface Transaction
prePrepare
public void prePrepare()
throws java.lang.Throwable
- Throws:
java.lang.Throwable
postCommit
protected void postCommit()
throws java.lang.Throwable
- Throws:
java.lang.Throwable
postRollback
public void postRollback()
throws java.lang.Throwable
- Throws:
java.lang.Throwable
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal
in interface java.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
writeExternal
in interface java.io.Externalizable
- Throws:
java.io.IOException
toString
public java.lang.String toString()
readTaskList
protected java.util.ArrayList readTaskList(java.io.ObjectInput in)
throws java.io.IOException
- Throws:
java.io.IOException
writeTaskList
protected void writeTaskList(java.util.ArrayList tasks,
java.io.ObjectOutput out)
throws java.io.IOException
- Throws:
java.io.IOException
readTask
protected TransactionTask readTask(java.io.ObjectInput in)
throws java.io.IOException
- Throws:
java.io.IOException
writeTask
protected void writeTask(TransactionTask task,
java.io.ObjectOutput out)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2004 Protique, Ltd.. All Rights Reserved.