Xapian::DatabaseReplicator Class Reference

Base class for database replicator objects. More...

#include <databasereplicator.h>

Inheritance diagram for Xapian::DatabaseReplicator:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~DatabaseReplicator ()
 Destroy the replicator.
virtual bool check_revision_at_least (const std::string &rev, const std::string &target) const =0
 Check if the revision of the database is at least that of a target.
virtual std::string apply_changeset_from_conn (RemoteConnection &conn, double end_time, bool db_valid) const =0
 Read and apply the next changeset.
virtual std::string get_uuid () const =0
 Get a UUID for the replica.

Static Public Member Functions

static DatabaseReplicatoropen (const std::string &path)
 Open a DatabaseReplicator for the given path.

Protected Member Functions

 DatabaseReplicator ()
 Constructor to allow construction of subclasses from the open() method.

Private Member Functions

 DatabaseReplicator (const DatabaseReplicator &)
 Copies are not allowed.
void operator= (const DatabaseReplicator &)
 Assignment is not allowed.


Detailed Description

Base class for database replicator objects.

This is subclassed by each database backend which supports replication.

Definition at line 38 of file databasereplicator.h.


Constructor & Destructor Documentation

Xapian::DatabaseReplicator::DatabaseReplicator ( const DatabaseReplicator  )  [private]

Copies are not allowed.

Xapian::DatabaseReplicator::DatabaseReplicator (  )  [inline, protected]

Constructor to allow construction of subclasses from the open() method.

Definition at line 50 of file databasereplicator.h.

Xapian::DatabaseReplicator::~DatabaseReplicator (  )  [virtual]

Destroy the replicator.

Definition at line 47 of file databasereplicator.cc.


Member Function Documentation

virtual std::string Xapian::DatabaseReplicator::apply_changeset_from_conn ( RemoteConnection conn,
double  end_time,
bool  db_valid 
) const [pure virtual]

Read and apply the next changeset.

Parameters:
conn The remote connection manager.
end_time The time to timeout at.
db_valid Whether the database is known to be valid at the start of the changeset. If this is true, some additional checks are performed.

Implemented in BrassDatabaseReplicator, ChertDatabaseReplicator, and FlintDatabaseReplicator.

virtual bool Xapian::DatabaseReplicator::check_revision_at_least ( const std::string &  rev,
const std::string &  target 
) const [pure virtual]

Check if the revision of the database is at least that of a target.

Parameters:
rev The database revision.
target The target revision.

Implemented in BrassDatabaseReplicator, ChertDatabaseReplicator, and FlintDatabaseReplicator.

virtual std::string Xapian::DatabaseReplicator::get_uuid (  )  const [pure virtual]

Get a UUID for the replica.

If the UUID cannot be read (for example, because the database is not valid), this should return the empty string, rather than raising an exception.

Implemented in BrassDatabaseReplicator, ChertDatabaseReplicator, and FlintDatabaseReplicator.

DatabaseReplicator * Xapian::DatabaseReplicator::open ( const std::string &  path  )  [static]

void Xapian::DatabaseReplicator::operator= ( const DatabaseReplicator  )  [private]

Assignment is not allowed.


The documentation for this class was generated from the following files:

Documentation for Xapian (version 1.2.13).
Generated on 9 Jan 2013 by Doxygen 1.5.9.