STLdb

PrevUpHomeNext

Class template database_registry

stldb::database_registry

Synopsis

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

template<typename void_alloc_t> 
class database_registry {
public:
  // construct/copy/destruct
  database_registry(const char *, const char *, const void_alloc_t &);
  database_registry();
  database_registry(const database_registry &);
  database_registry& operator=(const database_registry &);
  ~database_registry();

  // public member functions
  bool check_need_for_recovery() ;
  void await_complete_disconnect(boost::interprocess::scoped_lock< stldb::file_lock > &) ;
  stldb::file_lock * register_pid() ;
  void unregister_pid(stldb::file_lock *) ;
  int connected_pids() ;
  void construction_complete() ;
  void set_invalid(bool) ;
  bool is_valid() ;
  int attached_pids() ;

  // public static functions
  static std::string filelock_name(const char *, const char *) ;
};

Description

Object in shared memory region. This object is used to help track the validity of the database.

database_registry public construct/copy/destruct

  1. database_registry(const char * database_dir, const char * db_name, 
                      const void_alloc_t & alloc);
    Construct a database registry for db_name within the region that alloc.
  2. database_registry();
  3. database_registry(const database_registry &);
  4. database_registry& operator=(const database_registry &);
  5. ~database_registry();

database_registry public member functions

  1. bool check_need_for_recovery() ;
  2. void await_complete_disconnect(boost::interprocess::scoped_lock< stldb::file_lock > & held_lock) ;
  3. stldb::file_lock * register_pid() ;
  4. void unregister_pid(stldb::file_lock * lock) ;
  5. int connected_pids() ;
  6. void construction_complete() ;
  7. void set_invalid(bool value) ;
  8. bool is_valid() ;
  9. int attached_pids() ;

database_registry public static functions

  1. static std::string 
    filelock_name(const char * database_dir, const char * db_name) ;

PrevUpHomeNext