| 
    xapian-core
    1.4.29
    
   | 
 
#include <glass_changes.h>
 Collaboration diagram for GlassChanges:Public Member Functions | |
| GlassChanges (const std::string &db_dir) | |
| ~GlassChanges () | |
| GlassChanges * | start (glass_revision_number_t old_rev, glass_revision_number_t rev, int flags) | 
| void | write_block (const char *p, size_t len) | 
| void | write_block (const std::string &s) | 
| void | set_oldest_changeset (glass_revision_number_t rev) | 
| glass_revision_number_t | get_oldest_changeset () const | 
| void | commit (glass_revision_number_t new_rev, int flags) | 
Static Public Member Functions | |
| static void | check (const std::string &changes_file) | 
Private Attributes | |
| int | changes_fd | 
| File descriptor to write changeset to (or -1 for none).  More... | |
| std::string | changes_stem | 
| glass_revision_number_t | max_changesets | 
| The maximum number of changesets to keep.  More... | |
| glass_revision_number_t | oldest_changeset | 
| The oldest changeset which might exist on disk.  More... | |
Definition at line 28 of file glass_changes.h.
      
  | 
  inlineexplicit | 
Definition at line 50 of file glass_changes.h.
References start(), write_block(), and ~GlassChanges().
| GlassChanges::~GlassChanges | ( | ) | 
Definition at line 43 of file glass_changes.cc.
References close(), and io_unlink().
Referenced by GlassChanges().
      
  | 
  static | 
Definition at line 164 of file glass_changes.cc.
References CHANGES_MAGIC_STRING, CHANGES_VERSION, CONST_STRLEN, io_read(), O_CLOEXEC, posixy_open, unaligned_read4(), and unpack_uint().
Referenced by check_db_dir(), and get_oldest_changeset().
| void GlassChanges::commit | ( | glass_revision_number_t | new_rev, | 
| int | flags | ||
| ) | 
Definition at line 111 of file glass_changes.cc.
References close(), Xapian::DB_NO_SYNC, io_sync(), io_tmp_rename(), io_unlink(), io_write(), and Xapian::Internal::str().
Referenced by get_oldest_changeset(), and GlassDatabase::set_revision_number().
      
  | 
  inline | 
Definition at line 71 of file glass_changes.h.
References check(), commit(), and oldest_changeset.
Referenced by GlassWritableDatabase::flush_postlist_changes().
      
  | 
  inline | 
Definition at line 67 of file glass_changes.h.
Referenced by GlassDatabase::open_tables().
| GlassChanges * GlassChanges::start | ( | glass_revision_number_t | old_rev, | 
| glass_revision_number_t | rev, | ||
| int | flags | ||
| ) | 
Definition at line 54 of file glass_changes.cc.
References CHANGES_MAGIC_STRING, CHANGES_VERSION, Xapian::DB_DANGEROUS, io_write(), O_CLOEXEC, pack_uint(), and posixy_open.
Referenced by GlassDatabase::apply(), GlassChanges(), GlassDatabase::modifications_failed(), and GlassDatabase::open_tables().
| void GlassChanges::write_block | ( | const char * | p, | 
| size_t | len | ||
| ) | 
Definition at line 105 of file glass_changes.cc.
References io_write().
Referenced by GlassChanges(), GlassVersion::write(), and write_block().
      
  | 
  inline | 
Definition at line 63 of file glass_changes.h.
References write_block().
      
  | 
  private | 
File descriptor to write changeset to (or -1 for none).
Definition at line 30 of file glass_changes.h.
      
  | 
  private | 
Definition at line 32 of file glass_changes.h.
      
  | 
  private | 
The maximum number of changesets to keep.
If a slave is more than this number of changesets behind, it will need to be sent a full copy of the database (which can be more efficient if a lot has changed).
Definition at line 40 of file glass_changes.h.
      
  | 
  private | 
The oldest changeset which might exist on disk.
Used to optimise removal of old changesets by giving us a point to start looking for ones to delete.
Definition at line 47 of file glass_changes.h.
Referenced by get_oldest_changeset().