Provides a context to do transactional operations; so beginning/committing transactions, but also retrieving transactional data-structures like the TransactionalMap.
More...
#include <TransactionContext.h>
Provides a context to do transactional operations; so beginning/committing transactions, but also retrieving transactional data-structures like the TransactionalMap.
- See Also
- HazelcastClient::newTransactionContext
hazelcast::client::TransactionContext::TransactionContext |
( |
spi::ClientContext & |
clientContext, |
|
|
const TransactionOptions & |
txnOptions |
|
) |
| |
Constructor to be used internally.
Not public API.
void hazelcast::client::TransactionContext::beginTransaction |
( |
| ) |
|
Begins a transaction.
- Exceptions
-
IllegalStateException | if a transaction already is active. |
void hazelcast::client::TransactionContext::commitTransaction |
( |
| ) |
|
Commits a transaction.
- Exceptions
-
TransactionException | if no transaction is active or the transaction could not be committed. |
template<typename E >
TransactionalList< E > hazelcast::client::TransactionContext::getList |
( |
const std::string & |
name | ) |
|
|
inline |
Returns the transactional list instance with the specified name.
- Parameters
-
- Returns
- transactional list instance with the specified name
template<typename K , typename V >
TransactionalMap<K, V> hazelcast::client::TransactionContext::getMap |
( |
const std::string & |
name | ) |
|
|
inline |
Returns the transactional distributed map instance with the specified name.
- Parameters
-
name | name of the distributed map |
- Returns
- transactional distributed map instance with the specified name
template<typename K , typename V >
TransactionalMultiMap<K, V> hazelcast::client::TransactionContext::getMultiMap |
( |
const std::string & |
name | ) |
|
|
inline |
Returns the transactional multimap instance with the specified name.
- Parameters
-
- Returns
- transactional multimap instance with the specified name
template<typename E >
TransactionalQueue< E > hazelcast::client::TransactionContext::getQueue |
( |
const std::string & |
name | ) |
|
|
inline |
Returns the transactional queue instance with the specified name.
- Parameters
-
- Returns
- transactional queue instance with the specified name
template<typename E >
TransactionalSet< E > hazelcast::client::TransactionContext::getSet |
( |
const std::string & |
name | ) |
|
|
inline |
Returns the transactional set instance with the specified name.
- Parameters
-
- Returns
- transactional set instance with the specified name
template<typename T >
T hazelcast::client::TransactionContext::getTransactionalObject |
( |
const std::string & |
name | ) |
|
|
inline |
get any transactional object with template T.
Mostly to be used by spi implementers of Hazelcast.
- Returns
- transactionalObject.
std::string hazelcast::client::TransactionContext::getTxnId |
( |
| ) |
const |
void hazelcast::client::TransactionContext::rollbackTransaction |
( |
| ) |
|
Begins a transaction.
- Exceptions
-
IllegalStateException | if a transaction already is active. |
The documentation for this class was generated from the following files:
- hazelcast/include/hazelcast/client/TransactionContext.h
- hazelcast/src/hazelcast/client/TransactionContext.cpp