Encapsulates a transaction in the space.
All space operations require a transaction argument.
There are 2 types of transactions (that correspond to the types of Transaction Manager):
SpaceProxy::getLocalTransaction() - Local transaction only ITransactionManager::create() - Can be Local or Distributed transaction based on the Transaction Manager type
NULL_TX), meaning no transaction is used.
TransactionPtr txn = spaceProxy->getLocalTransaction();
Message msg;
msg.content = "Hello World";
spaceProxy->write( &msg, txn, Lease::FOREVER );
txn->commit();
Public Member Functions | |
| virtual void | abort (long long waitForTime=MAX_TIMEOUT)=0 |
| Aborts the transaction. | |
| virtual void | commit (long long waitForTime=MAX_TIMEOUT)=0 |
| Commits the transaction. | |
| virtual | ~Transaction () |
| Destructor for a transaction object. | |
| Transaction::~Transaction | ( | ) | [virtual] |
Destructor for a transaction object.
Performs cleanup.
| virtual void Transaction::abort | ( | long long | waitForTime = MAX_TIMEOUT |
) | [pure virtual] |
Aborts the transaction.
If waitForTime is positive then waiting for participants to be notified of the decision.
| waitForTime | - Time in milliseconds to wait until all participants are notified. Default is MAX_TIMEOUT. |
| RemoteException | - if a communication error occurs |
| virtual void Transaction::commit | ( | long long | waitForTime = MAX_TIMEOUT |
) | [pure virtual] |
Commits the transaction.
If waitForTime is positive then waiting for participants to be notified of the decision.
| waitForTime | - Time in milliseconds to wait until all participants are notified. Default is MAX_TIMEOUT. |
| RemoteException | - if a communication error occurs |
1.5.3