Drizzled Public API Documentation

drizzled::plugin::MonitoredInTransaction Class Reference

#include <monitored_in_transaction.h>

Inheritance diagram for drizzled::plugin::MonitoredInTransaction:
drizzled::plugin::StorageEngine drizzled::plugin::TransactionalStorageEngine Function Schema TableProtoTesterEngine drizzled::plugin::SEAPITester drizzled::plugin::XaStorageEngine

List of all members.

Public Member Functions

virtual bool participatesInSqlTransaction () const =0
virtual bool participatesInXaTransaction () const =0
virtual bool alwaysRegisterForXaTransaction () const =0
size_t getId () const

Private Attributes

size_t id

Detailed Description

An abstract interface class for those objects which are tracked by the TransactionServices component during operations in a transaction.

Note that both non-transactional plugin::StorageEngines, non-XA plugin::TransactionalStorageEngines, and plugin::XaResourceManager objects are all tracked by the transaction manager in TransactionServices.

Implementing classes should inherit publically from plugin::MonitoredInTransaction, as public inheritance means "is a" and is the appropriate use here since all implementing classes are monitored in a transaction...

Definition at line 48 of file monitored_in_transaction.h.


Member Function Documentation

virtual bool drizzled::plugin::MonitoredInTransaction::alwaysRegisterForXaTransaction ( ) const
pure virtual

Returns true if the class should be registered for every XA transaction regardless of whether the class modifies the server's state.

Note:

As an example, the XaTransactionApplier plugin class returns true for this virtual method. Even though it does not change the result of the transaction (it simply is logging the changes made by other resource managers), the applier plugin should be enlisted in all XA transactions in order to be able to rollback or recover its logging activity properly.

Implemented in drizzled::plugin::StorageEngine, drizzled::plugin::TransactionalStorageEngine, and drizzled::plugin::XaStorageEngine.

size_t drizzled::plugin::MonitoredInTransaction::getId ( ) const
inline

Returns the "slot" or ID of the monitored resource

Definition at line 87 of file monitored_in_transaction.h.

virtual bool drizzled::plugin::MonitoredInTransaction::participatesInSqlTransaction ( ) const
pure virtual
virtual bool drizzled::plugin::MonitoredInTransaction::participatesInXaTransaction ( ) const
pure virtual

Member Data Documentation

size_t drizzled::plugin::MonitoredInTransaction::id
private

The ID or "slot" of the plugin.

Todo:

Maybe move this into plugin::Plugin? Only issue then is that all plugins would have a ha_data slot, when only a few actually need that. Maybe create a plugin::NeedsSessionData?

Definition at line 101 of file monitored_in_transaction.h.


The documentation for this class was generated from the following files: