STLdb

PrevUpHomeNext

Class checkpoint_ofstream

stldb::checkpoint_ofstream

Synopsis

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


class checkpoint_ofstream : protected stldb::checkpoint_fstream_base {
public:
  // construct/copy/destruct
  checkpoint_ofstream(const boost::filesystem::path &);
  checkpoint_ofstream(const boost::filesystem::path &, const char *);
  checkpoint_ofstream(const boost::filesystem::path &, 
                      const checkpoint_file_info &);
  ~checkpoint_ofstream();

  // public member functions
  void clear();
  template<typename InputIterator> 
    void add_free_space(InputIterator, InputIterator);
  void add_free_space(const checkpoint_loc_t &);
  template<typename T> checkpoint_loc_t write(const T &);
  void commit(transaction_id_t, transaction_id_t);

  // protected member functions
  checkpoint_loc_t allocate(std::size_t);
  void write(boost::interprocess::offset_t, std::size_t, std::string);
  void add_free_space();

  // private member functions
  void open_checkpoint();
};

Description

checkpoint_ofstream public construct/copy/destruct

  1. checkpoint_ofstream(const boost::filesystem::path & metafile);
  2. checkpoint_ofstream(const boost::filesystem::path & checkpoint_path, 
                        const char * container_name);
  3. checkpoint_ofstream(const boost::filesystem::path & checkpoint_path, 
                        const checkpoint_file_info & checkpoint_info);
  4. ~checkpoint_ofstream();

checkpoint_ofstream public member functions

  1. void clear();
  2. template<typename InputIterator> 
      void add_free_space(InputIterator begin, InputIterator end);
  3. void add_free_space(const checkpoint_loc_t & space);
  4. template<typename T> checkpoint_loc_t write(const T & obj);
  5. void commit(transaction_id_t lsn_at_start, transaction_id_t lsn_at_end);

checkpoint_ofstream protected member functions

  1. checkpoint_loc_t allocate(std::size_t size);
  2. void write(boost::interprocess::offset_t offset, std::size_t length, 
               std::string image);
  3. void add_free_space();

checkpoint_ofstream private member functions

  1. void open_checkpoint();

PrevUpHomeNext