![]() |
Hazelcast C++ Client
Hazelcast C++ Client Library
|
Provides a context to do transactional operations; so beginning/committing transactions, but also retrieving transactional data-structures like the TransactionalMap. More...
#include <transaction_context.h>
Public Member Functions | |
transaction_context (spi::impl::ClientTransactionManagerServiceImpl &transaction_manager, const transaction_options &) | |
Constructor to be used internally. | |
boost::uuids::uuid | get_txn_id () const |
boost::future< void > | begin_transaction () |
Begins a transaction. | |
boost::future< void > | commit_transaction () |
Commits a transaction. | |
boost::future< void > | rollback_transaction () |
Begins a transaction. | |
std::shared_ptr< transactional_map > | get_map (const std::string &name) |
Returns the transactional distributed map instance with the specified name. | |
std::shared_ptr< transactional_queue > | get_queue (const std::string &name) |
Returns the transactional queue instance with the specified name. | |
std::shared_ptr< transactional_multi_map > | get_multi_map (const std::string &name) |
Returns the transactional multimap instance with the specified name. | |
std::shared_ptr< transactional_list > | get_list (const std::string &name) |
Returns the transactional list instance with the specified name. | |
std::shared_ptr< transactional_set > | get_set (const std::string &name) |
Returns the transactional set instance with the specified name. | |
template<typename T> | |
std::shared_ptr< T > | get_transactional_object (const std::string &service_name, const std::string &name) |
get any transactional object with template T. |
Provides a context to do transactional operations; so beginning/committing transactions, but also retrieving transactional data-structures like the TransactionalMap.
Definition at line 68 of file transaction_context.h.
hazelcast::client::transaction_context::transaction_context | ( | spi::impl::ClientTransactionManagerServiceImpl & | transaction_manager, |
const transaction_options & | txn_options ) |
Constructor to be used internally.
Not public API.
Definition at line 715 of file transactions.cpp.
boost::future< void > hazelcast::client::transaction_context::begin_transaction | ( | ) |
Begins a transaction.
illegal_state | if a transaction already is active. |
Definition at line 730 of file transactions.cpp.
boost::future< void > hazelcast::client::transaction_context::commit_transaction | ( | ) |
Commits a transaction.
transaction | if no transaction is active or the transaction could not be committed. |
Definition at line 736 of file transactions.cpp.
|
inline |
Returns the transactional list instance with the specified name.
name | name of the list |
Definition at line 154 of file transaction_context.h.
|
inline |
Returns the transactional distributed map instance with the specified name.
name | name of the distributed map |
Definition at line 114 of file transaction_context.h.
|
inline |
Returns the transactional multimap instance with the specified name.
name | name of the multimap |
Definition at line 140 of file transaction_context.h.
|
inline |
Returns the transactional queue instance with the specified name.
name | name of the queue |
Definition at line 127 of file transaction_context.h.
|
inline |
Returns the transactional set instance with the specified name.
name | name of the set |
Definition at line 167 of file transaction_context.h.
|
inline |
get any transactional object with template T.
Mostly to be used by spi implementers of Hazelcast.
Definition at line 181 of file transaction_context.h.
boost::uuids::uuid hazelcast::client::transaction_context::get_txn_id | ( | ) | const |
Definition at line 724 of file transactions.cpp.
boost::future< void > hazelcast::client::transaction_context::rollback_transaction | ( | ) |
Begins a transaction.
illegal_state | if a transaction already is active. |
Definition at line 742 of file transactions.cpp.