Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

CdbTransactionBase.hh

Go to the documentation of this file.
00001 #ifndef CDB_TRANSACTION_BASE_HH
00002 #define CDB_TRANSACTION_BASE_HH
00003 
00004 // File and Version Information:
00005 //      $Id: CdbTransactionBase.hh,v 1.1 2005/02/02 13:54:56 gapon Exp $
00006 
00007 #include "CdbBase/CdbCommon.hh"
00008 
00009 /// A base interface for technology specific transaction managers
00010 /**
00011   * This class provides a foundation for technology-specific implementations
00012   * of transaction management using the "resource-acquisition-is-initialization"
00013   * paradigm:
00014   *
00015   * - The transaction is supposed to be started when a constructor of a subclass
00016   *   is invoked.
00017   *
00018   * - The transaction is commited when a destructor of the subclass is executed.
00019   *
00020   * Note, that an actual transaction mode is managed by subclasses. The current
00021   * interface's role is to provide a mechanizm of events when important
00022   * changes in the lifetime of the transaction are taking place.
00023   */
00024 class CdbTransactionBase {
00025 
00026 public:
00027 
00028   /// The constructor
00029   /**
00030     * The transaction starts in the constructor of the subclass.
00031     */
00032     CdbTransactionBase( ) { };
00033  
00034   /// The destructor
00035   /**
00036     * The transaction ends in the destructor of the subclass.
00037     */
00038     virtual ~CdbTransactionBase( ) { };
00039 
00040   /// Flush modifications made within the current transaction and keep going
00041   /**
00042     * The semantic of this operations may vary for different persistent
00043     * technologies and implementations.
00044     */
00045     virtual void commitAndHold( ) = 0;
00046 };
00047 
00048 #endif  // CDB_TRANSACTION_BASE_HH

Generated on Mon Dec 5 18:22:12 2005 for CDB by doxygen1.3-rc3