![]() |
stldb::DatabaseInfo
// In header: </Users/bobw/workspaces/STLdb/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); // public member functions template<typename Archive> void serialize(Archive &, const unsigned int); // public data members 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; };
The master database information record - stored in the shared region.
DatabaseInfo
public
public data memberstransaction_id_t next_txn_id;
In progress transactions have one set of Ids. When they are committed, they are assigned a log sequence number (see the logger's shared data)
slist< commit_buffer_t< void_allocator_t >, cache_last< true > > _buffer_queue;
An intrusive list of available commit buffers. These are created as needed and then reused across processes to minimize allocation.
SharedLogInfo< void_allocator_t, mutex_t > logInfo;
Data held in shared memory for supporting the write-ahead log.