public class MXTransactionImpl extends java.lang.Object implements MXTransaction
MXTransactionInvalidStatus| Constructor and Description |
|---|
MXTransactionImpl(java.lang.Object id)
Construct a transaction with the specified ID.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Transactable txn)
Add a Transactable object to the list of objects coordinated by this transaction.
|
void |
add(Transactable txn,
long status)
Add a transactable object to the transaction.
|
void |
clear()
clears the transactable array.
|
void |
clearTxnPropertyMap()
Clears the transaction property map after commit or rollback
|
void |
commit()
Commit the transaction.
|
void |
commitTransaction(MXTransaction txn)
Commit the transaction
|
void |
fireEventsAfterDB(MXTransaction txn)
fire events for all mbos in the transaction after db operation.
|
void |
fireEventsAfterDBCommit(MXTransaction txn)
fire events for all mbos in the transaction after db commit.
|
void |
fireEventsBeforeDB(MXTransaction txn)
fire events for all mbos in the transaction before db operation.
|
boolean |
getBoolean(java.lang.String keyString)
Gets the value from the Hashtable for the specified KeyString.
|
java.lang.Object |
getID()
Return the unique ID of the transaction.
|
int |
getInt(java.lang.String keyString)
Gets the value from the Hashtable for the specified KeyString.
|
int |
getSize()
gets the Size of the transactable array.
|
java.lang.String |
getString(java.lang.String keyString)
Gets the value from the Hashtable for the specified KeyString.
|
long |
getTransactionStatus(Transactable t)
Returns the transactable status of specified transactable.
|
java.util.Map |
getTxnPropertyMap(Transactable t)
Get the transaction property map for the transactable
|
int |
indexOf(Transactable t)
Returns the index (0 based) of the specified object in the transaction.
|
void |
put(java.lang.String keyString,
boolean value)
Stores the value of keyStrings and values in the hashtable.
|
void |
put(java.lang.String keyString,
java.lang.String value)
Stores the value of keyStrings and values in the hashtable.
|
boolean |
remove(Transactable t)
removes the Transactable object from the transactable array.
|
void |
rollback()
Rollback the transaction
|
void |
rollbackTransaction(MXTransaction txn)
Rollback the transaction
|
void |
save()
Save the transaction to storage
|
void |
saveTransaction(MXTransaction txn)
Save the transaction.
|
void |
setEventFired(boolean flag)
Sets the event fired flag.
|
void |
setIndexOf(Transactable tsb,
int order)
First it will remove the transactable object from the transactable vector if the transactable
object is found.
|
void |
setTxnPropertyMap(Transactable t,
java.util.Map map)
Set the transaction property map for the transactable
|
void |
undoTransaction(MXTransaction txn)
Undo a transaction if it has been committed.
|
void |
validate()
Validate the transaction
|
boolean |
validateTransaction(MXTransaction txn)
validate transaction.
|
public MXTransactionImpl(java.lang.Object id)
throws java.rmi.RemoteException
id - Unique ID for the transactionjava.rmi.RemoteException - Network ErrorMXServerpublic java.lang.Object getID()
getID in interface MXTransactionpublic void add(Transactable txn) throws java.rmi.RemoteException
add in interface MXTransactiontxn - Transactable objectjava.rmi.RemoteException - Network ErrorTransactablepublic void add(Transactable txn, long status) throws java.rmi.RemoteException
MXTransactionadd in interface MXTransactiontxn - Transactable Objectjava.rmi.RemoteException - Network Errorpublic void save()
throws MXException,
java.rmi.RemoteException
save in interface MXTransactionMXException - Error while savingjava.rmi.RemoteException - Network errorpublic void commit()
throws MXException,
java.rmi.RemoteException
commit in interface MXTransactionMXException - Error while savingjava.rmi.RemoteException - Network errorpublic void rollback()
throws MXException,
java.rmi.RemoteException
rollback in interface MXTransactionMXException - Error while rolling backjava.rmi.RemoteException - Network Errorpublic void validate()
throws MXException,
java.rmi.RemoteException
MXException - Error while rolling backjava.rmi.RemoteException - Network Errorpublic void saveTransaction(MXTransaction txn) throws MXException, java.rmi.RemoteException
saveTransaction in interface Transactabletxn - Transaction to save. This method is called when
there are nested transactionsMXException - Error while savingjava.rmi.RemoteException - Network errorpublic void commitTransaction(MXTransaction txn) throws MXException, java.rmi.RemoteException
commitTransaction in interface Transactabletxn - Transaction that caused the commit. This is used
for nested transactions.MXException - Error while committingjava.rmi.RemoteException - Network errorpublic void rollbackTransaction(MXTransaction txn) throws MXException, java.rmi.RemoteException
rollbackTransaction in interface Transactabletxn - Transaction that caused the rollback. Used for
nested transactionsMXException - Error while rolling backjava.rmi.RemoteException - Network errorpublic void undoTransaction(MXTransaction txn) throws MXException, java.rmi.RemoteException
undoTransaction in interface Transactabletxn - Transaction that caused the undo. Used for nested
transactionsMXException - Error while undoingjava.rmi.RemoteException - Network errorpublic boolean validateTransaction(MXTransaction txn) throws MXException, java.rmi.RemoteException
validateTransaction in interface Transactabletxn - Transaction that caused the saveMXException - Error while committingjava.rmi.RemoteException - Network errorpublic void fireEventsBeforeDB(MXTransaction txn) throws MXException, java.rmi.RemoteException
fireEventsBeforeDB in interface Transactabletxn - TransactionMXException - Error while committingjava.rmi.RemoteException - Network errorpublic void fireEventsAfterDB(MXTransaction txn) throws MXException, java.rmi.RemoteException
fireEventsAfterDB in interface Transactabletxn - TransactionMXException - Error while committingjava.rmi.RemoteException - Network errorpublic void fireEventsAfterDBCommit(MXTransaction txn) throws MXException, java.rmi.RemoteException
fireEventsAfterDBCommit in interface Transactabletxn - TransactionMXException - Error while committingjava.rmi.RemoteException - Network errorpublic void put(java.lang.String keyString,
boolean value)
throws java.rmi.RemoteException
put in interface MXTransactionkeyString - value - java.rmi.RemoteExceptionpublic void put(java.lang.String keyString,
java.lang.String value)
throws java.rmi.RemoteException
put in interface MXTransactionkeyString - value - java.rmi.RemoteExceptionpublic boolean getBoolean(java.lang.String keyString)
throws java.rmi.RemoteException
getBoolean in interface MXTransactionkeyString - java.rmi.RemoteExceptionpublic int getInt(java.lang.String keyString)
keyString - public java.lang.String getString(java.lang.String keyString)
throws java.rmi.RemoteException
getString in interface MXTransactionkeyString - java.rmi.RemoteExceptionpublic boolean remove(Transactable t) throws java.rmi.RemoteException
remove in interface MXTransactiont - java.rmi.RemoteExceptionpublic long getTransactionStatus(Transactable t) throws MXException, java.rmi.RemoteException
MXTransactiongetTransactionStatus in interface MXTransactionMXException - when the transactable doesn't exist in the transactionjava.rmi.RemoteExceptionpublic void clear()
throws java.rmi.RemoteException
clear in interface MXTransactionjava.rmi.RemoteExceptionpublic int indexOf(Transactable t) throws MXObjectNotFoundException, java.rmi.RemoteException
indexOf in interface MXTransactionMXObjectNotFoundException - - if specified object not foundjava.rmi.RemoteException - Network errorpublic void setIndexOf(Transactable tsb, int order) throws MXException, java.rmi.RemoteException
setIndexOf in interface MXTransactiontsb - order - MXExceptionjava.rmi.RemoteExceptionpublic int getSize()
throws java.rmi.RemoteException
getSize in interface MXTransactionjava.rmi.RemoteExceptionpublic void setEventFired(boolean flag)
throws java.rmi.RemoteException
setEventFired in interface MXTransactionflag - java.rmi.RemoteExceptionpublic java.util.Map getTxnPropertyMap(Transactable t) throws MXException, java.rmi.RemoteException
getTxnPropertyMap in interface MXTransactionTransactable - MXExceptionjava.rmi.RemoteExceptionpublic void setTxnPropertyMap(Transactable t, java.util.Map map) throws MXException, java.rmi.RemoteException
setTxnPropertyMap in interface MXTransactionTransactable - Map - MXExceptionjava.rmi.RemoteExceptionpublic void clearTxnPropertyMap()
throws MXException,
java.rmi.RemoteException
MXExceptionjava.rmi.RemoteException