STLdb

PrevUpHomeNext

Struct template DatabaseInfo

stldb::DatabaseInfo

Synopsis

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

template<typename void_allocator_t, typename mutex_t> 
struct DatabaseInfo {
  // types
  typedef void_allocator_t::template rebind< char >::other                                                                                                                                  shm_char_allocator_t;
  typedef boost::interprocess::basic_string< char, std::char_traits< char >, shm_char_allocator_t >                                                                                         shm_string;          
  typedef boost::interprocess::map< shm_string, transaction_id_t, std::less< shm_string >, typename void_allocator_t::template rebind< std::pair< shm_string, transaction_id_t > >::other > ckpt_history_map_t;  

  // construct/copy/destruct
  DatabaseInfo(const void_allocator_t &);
  DatabaseInfo(void);
  mutex_t mutex;  // This region needs a mutex to protect its contents from concurrent modification. 
  boost::interprocess::interprocess_upgradable_mutex transaction_lock;  // lock for coordinating regular vs exclusive transactions 
  transaction_id_t next_txn_id;
  slist< commit_buffer_t< void_allocator_t >, cache_last< true > > _buffer_queue;
  SharedLogInfo< void_allocator_t, mutex_t > logInfo;
  ckpt_history_map_t ckpt_history_map;
  float max_incremental_percent;
  shm_string database_name;
  shm_string database_directory;
  shm_string checkpoint_directory;
};

Description

The master database information record - stored in the shared region.

DatabaseInfo public construct/copy/destruct

  1. DatabaseInfo(const void_allocator_t & alloc);
  2. DatabaseInfo(void);

PrevUpHomeNext