|
| XaTransaction (XaTransaction&& src) noexcept |
|
XaTransaction& | operator= (XaTransaction&& src) noexcept |
|
virtual | ~XaTransaction () noexcept |
|
GdaXaTransaction* | gobj () |
| Provides access to the underlying C GObject. More...
|
|
const GdaXaTransaction* | gobj () const |
| Provides access to the underlying C GObject. More...
|
|
GdaXaTransaction* | gobj_copy () |
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
|
|
bool | register_connection (const Glib::RefPtr< Connection >& cnc, const Glib::ustring& branch) |
| Registers cnc to be used by xa_trans to create a distributed transaction. More...
|
|
void | unregister_connection (const Glib::RefPtr< Connection >& cnc) |
| Unregisters cnc to be used by xa_trans to create a distributed transaction. More...
|
|
bool | begin () |
| Begins a distributed transaction (managed by xa_trans). More...
|
|
bool | rollback () |
| Cancels a distributed transaction (managed by xa_trans). More...
|
|
bool | commit (ConnectionVector& cnc_to_recover) |
| Commits a distributed transaction (managed by xa_trans). More...
|
|
bool | commit_recovered (ConnectionVector& cnc_to_recover) |
| Tries to commit the data prepared but which failed to commit (see commit()). More...
|
|
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_transaction_id () const |
|
Glib::PropertyProxy_ReadOnly< guint > | property_format_id () const |
|
| Object (const Object &)=delete |
|
Object & | operator= (const Object &)=delete |
|
| Object (Object &&src) noexcept |
|
Object & | operator= (Object &&src) noexcept |
|
void * | get_data (const QueryQuark &key) |
|
void | set_data (const Quark &key, void *data) |
|
void | set_data (const Quark &key, void *data, DestroyNotify notify) |
|
void | remove_data (const QueryQuark &quark) |
|
void * | steal_data (const QueryQuark &quark) |
|
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false) |
|
| ObjectBase (const ObjectBase &)=delete |
|
ObjectBase & | operator= (const ObjectBase &)=delete |
|
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value) |
|
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const |
|
void | set_property (const Glib::ustring &property_name, const PropertyType &value) |
|
void | get_property (const Glib::ustring &property_name, PropertyType &value) const |
|
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot) |
|
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot) |
|
void | freeze_notify () |
|
void | thaw_notify () |
|
virtual void | reference () const |
|
virtual void | unreference () const |
|
GObject * | gobj () |
|
const GObject * | gobj () const |
|
GObject * | gobj_copy () const |
|
| trackable () |
|
| trackable (const trackable &src) |
|
| trackable (trackable &&src) noexcept |
|
| ~trackable () |
|
void | add_destroy_notify_callback (void *data, func_destroy_notify func) const |
|
void | notify_callbacks () |
|
trackable & | operator= (const trackable &src) |
|
trackable & | operator= (trackable &&src) noexcept |
|
void | remove_destroy_notify_callback (void *data) const |
|
Distributed transaction manager.
Commits a distributed transaction (managed by xa_trans).
The commit is composed of two phases:
- a PREPARE phase where all the connections are required to store their transaction data to a permanent place (to be able to complete the commit should a problem occur afterwards)
- a COMMIT phase where the transaction data is actually written to the database
If the PREPARE phase fails for any of the connection registered with xa_trans, then the distributed commit fails and false
is returned. During the COMMIT phase, some commit may actually fail but the transaction can still be completed because the PREPARE phase succeeded (through the recover method).
- Parameters
-
cnc_to_recover | A place to store the list of connections for which the commit phase failed, or 0 . |
- Returns
true
if no error occurred (there may be some connections to recover, though).