STLdb

PrevUpHomeNext

Class template container_proxy_base

stldb::container_proxy_base

Synopsis

// In header: </Users/bobw/workspaces/STLdb/stldb_lib/stldb/container_proxy.h>

template<typename ManagedRegionType> 
class container_proxy_base {
public:
  // construct/copy/destruct
  container_proxy_base(const char *);
  ~container_proxy_base();

  // public member functions
  virtual void * 
  find_or_construct_container(Database< ManagedRegionType > &) = 0;
  virtual void recoverOp(int, boost_iarchive_t &, transaction_id_t) = 0;
  virtual std::string getName();
  virtual void initializeCommit(Transaction &) = 0;
  virtual void completeCommit(Transaction &) = 0;
  virtual void initializeRollback(Transaction &) = 0;
  virtual void completeRollback(Transaction &) = 0;
  virtual void 
  save_checkpoint(Database< ManagedRegionType > &, checkpoint_ofstream &, 
                  transaction_id_t) = 0;
  virtual void load_checkpoint(checkpoint_ifstream &) = 0;
};

Description

Container_proxy_base is the interface between the Database and the contaners within it. It permits some generic functionality which depends on the run-time polymorphism provided by this class. Every container passes a proxy to the database at the time the database constructor is called. The database then uses the proxy to create, load, recover, etc. the containers within it.

container_proxy_base public construct/copy/destruct

  1. container_proxy_base(const char * name);
  2. ~container_proxy_base();

container_proxy_base public member functions

  1. virtual void * 
    find_or_construct_container(Database< ManagedRegionType > & db) = 0;
  2. virtual void 
    recoverOp(int opcode, boost_iarchive_t & stream, transaction_id_t lsn) = 0;
  3. virtual std::string getName();
  4. virtual void initializeCommit(Transaction & trans) = 0;
  5. virtual void completeCommit(Transaction & trans) = 0;
  6. virtual void initializeRollback(Transaction & trans) = 0;
  7. virtual void completeRollback(Transaction & trans) = 0;
  8. virtual void 
    save_checkpoint(Database< ManagedRegionType > & db, 
                    checkpoint_ofstream & checkpoint, 
                    transaction_id_t last_checkpoint_lsn) = 0;
  9. virtual void load_checkpoint(checkpoint_ifstream & checkpoint) = 0;

PrevUpHomeNext