#include <databasereplicator.h>

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 DatabaseReplicator * | open (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. | |
This is subclassed by each database backend which supports replication.
Definition at line 38 of file databasereplicator.h.
| 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] |
| 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.
| 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.
| 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] |
Open a DatabaseReplicator for the given path.
The type of the database at the path is automatically detected.
Definition at line 52 of file databasereplicator.cc.
References file_exists(), and LOGCALL_STATIC_VOID.
Referenced by FlintDatabaseReplicator::process_changeset_chunk_base(), ChertDatabaseReplicator::process_changeset_chunk_base(), BrassDatabaseReplicator::process_changeset_chunk_base(), FlintDatabaseReplicator::process_changeset_chunk_blocks(), ChertDatabaseReplicator::process_changeset_chunk_blocks(), and BrassDatabaseReplicator::process_changeset_chunk_blocks().
| void Xapian::DatabaseReplicator::operator= | ( | const DatabaseReplicator & | ) | [private] |
Assignment is not allowed.