STLdb

PrevUpHomeNext

Class TransactionalOperation

stldb::TransactionalOperation

Synopsis

// In header: </Users/bobw/workspace/stldb_lib/stldb/transaction.h>


class TransactionalOperation :
  public boost::intrusive::list_base_hook< optimize_size< false > >
{
public:
  // construct/copy/destruct
  ~TransactionalOperation();

  // public member functions
  const char * get_container_name() const;
  int get_op_code() const;
  int add_to_log(boost_oarchive_t &) ;
  void commit(Transaction &) ;
  void rollback(Transaction &) ;
  void recover(boost_iarchive_t &) ;
  template<typename boost_archive_out> 
    void serialize_header(boost_archive_out &) ;

  // public static functions
  template<typename boost_archive_in> 
    static std::pair< std::string, int > 
    deserialize_header(boost_archive_in &) ;
};

Description

A transaction accumulates a set of TransactionalOperations, and a TransactionalOperation is any object implementing this interface. This polymorphic approach is used so that when the transaction is committed, the transaction commit or rollback can be done by a generic bit of code which uses that polymorphism.

TransactionalOperation public construct/copy/destruct

  1. ~TransactionalOperation();

TransactionalOperation public member functions

  1. const char * get_container_name() const;
  2. int get_op_code() const;
  3. int add_to_log(boost_oarchive_t & buffer) ;
  4. void commit(Transaction & trans) ;
  5. void rollback(Transaction & trans) ;
  6. void recover(boost_iarchive_t & stream) ;
  7. template<typename boost_archive_out> 
      void serialize_header(boost_archive_out & s) ;

TransactionalOperation public static functions

  1. template<typename boost_archive_in> 
      static std::pair< std::string, int > 
      deserialize_header(boost_archive_in & s) ;

PrevUpHomeNext