#include <Transaction.hh>
Inherits fatalmind::Command< PT >< fatalmind::PoolType >.
Public Types | |
typedef PT | pool_type |
Public Member Functions | |
Transaction (const Command< fatalmind::ResourceType::mysql > &) | |
Transaction (const ResourcePool< ResourceType > &p, const Command< fatalmind::ResourceType::mysql > &) | |
Transaction (const Transaction &) | |
virtual void | execute (mysqlResource &) |
virtual void | execute (typename PT::resource_t &rr)=0 |
The execute method is the one which actually carries out the work. | |
Protected Member Functions | |
virtual Clone * | DoClone () const |
void | startTransaction (mysqlResource &) |
void | commit (mysqlResource &) |
void | rollback (mysqlResource &) |
const PT::factory_t & | getFactory (const ResourcePool< PT > &p) const |
Friends | |
class | ResourcePool< PT > |
virtual void fatalmind::Command< PT >::execute | ( | typename PT::resource_t & | rr | ) | [pure virtual, inherited] |
The execute method is the one which actually carries out the work.
This method gets called by ResourcePool with a (valid) plain resource which was obtained from the pool.
On normal execution (no exception) the resource will be free()ed, on abnormal execution (exception) the resource will be failed. If you need to throw an functional exception which should not cause failing of the resource, derive this exception from NoFailoverException.