Public Member Functions | |
DatabaseMaster (const std::string &path_) | |
Create a new DatabaseMaster for the database at the specified path. | |
void | 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. | |
std::string | get_description () const |
Return a string describing this object. |
Warning: the replication interface is currently experimental, and is liable to change between releases without warning.
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.
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.
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. |