00001 #ifndef CDBTOOLS_COMMAND_TRANS_HH 00002 #define CDBTOOLS_COMMAND_TRANS_HH 00003 00004 // File and Version Information: 00005 // $Id: CdbCommandTrans.hh,v 1.1 2002/11/27 23:47:22 gapon Exp $ 00006 00007 #include "CdbBase/CdbCommon.hh" 00008 00009 /// This in an abstract base class providing an interface to the transactions management 00010 /** 00011 * Concrete incarnations of the pure virtual methods defined in this class 00012 * will implement the corresponding transaction management policies. 00013 * 00014 * NOTES: (1) The actual implementations of operations provided through this 00015 *. interface will vary. 00016 * 00017 * (2) Always check the status value returned by the operations. 00018 */ 00019 class CdbCommandTrans { 00020 00021 public: 00022 00023 /// Destructor 00024 00025 virtual ~CdbCommandTrans( ); 00026 00027 /// Start a new transaction 00028 00029 virtual CdbStatus start( ) = 0; 00030 00031 /// Commit an active transaction 00032 00033 virtual CdbStatus commit( ) = 0; 00034 00035 /// Commit and hold an active transaction 00036 00037 virtual CdbStatus commitAndHold( ) = 0; 00038 00039 /// Abort an active transaction 00040 00041 virtual CdbStatus abort( ) = 0; 00042 00043 protected: 00044 00045 /// Constructor 00046 00047 CdbCommandTrans( ); 00048 }; 00049 00050 #endif /* CDBTOOLS_COMMAND_TRANS_HH */
1.3-rc3