Xapian::DatabaseMaster Class Reference

#include <replication.h>

List of all members.

Public Member Functions

 DatabaseMaster (const std::string &path_)
void write_changesets_to_fd (int fd, const std::string &start_revision, ReplicationInfo *info) const
std::string get_description () const
 Return a string describing this object.


Detailed Description

Access to a master database for replication.

Warning: the replication interface is currently experimental, and is liable to change between releases without warning.


Constructor & Destructor Documentation

Xapian::DatabaseMaster::DatabaseMaster ( const std::string &  path_  )  [inline]

Create a new DatabaseMaster for the database at the specified path.

The database isn't actually opened until a set of changesets is requested.


Member Function Documentation

void Xapian::DatabaseMaster::write_changesets_to_fd ( int  fd,
const std::string &  start_revision,
ReplicationInfo info 
) const

Write a set of changesets for upgrading the database to a file.

The changesets will be such that, if they are applied in order to a copy of the database at the start revision, a copy of the database at the current revision (i.e. the revision which the database object is currently open at) will be produced.

If suitable changesets have been stored in the database, this will write the appropriate changesets, in order. If suitable changesets are not available, this will write a copy of sufficient blocks of the database to reconstruct the current revision.

This will therefore potentially write a very large amount of data to the file descriptor.

Parameters:
fd An open file descriptor to write the changes to.
start_revision The starting revision of the database that the changesets are to be applied to. Specify an empty string to get a "creation" changeset, which includes the creation of the database. The revision will include the unique identifier for the database, if one is available.
info If non-NULL, the supplied structure will be updated to reflect the changes written to the file descriptor.

std::string Xapian::DatabaseMaster::get_description (  )  const

Return a string describing this object.


The documentation for this class was generated from the following file:
Documentation for Xapian (version 1.1.1).
Generated on 10 Jun 2009 by Doxygen 1.5.2.