xapian-core
1.4.26
|
#include <chert_databasereplicator.h>
Public Member Functions | |
ChertDatabaseReplicator (const std::string &db_dir_) | |
bool | check_revision_at_least (const std::string &rev, const std::string &target) const |
Virtual methods of DatabaseReplicator. More... | |
std::string | apply_changeset_from_conn (RemoteConnection &conn, double end_time, bool valid) const |
Virtual methods of DatabaseReplicator. More... | |
std::string | get_uuid () const |
Virtual methods of DatabaseReplicator. More... | |
Public Member Functions inherited from Xapian::DatabaseReplicator | |
virtual | ~DatabaseReplicator () |
Destroy the replicator. More... | |
Private Member Functions | |
void | process_changeset_chunk_base (const std::string &tablename, std::string &buf, RemoteConnection &conn, double end_time, int changes_fd) const |
Process a chunk which holds a base block. More... | |
void | process_changeset_chunk_blocks (const std::string &tablename, std::string &buf, RemoteConnection &conn, double end_time, int changes_fd) const |
Process a chunk which holds a list of changed blocks in the database. More... | |
Private Attributes | |
std::string | db_dir |
Path of database. More... | |
unsigned int | max_changesets |
The maximum number of changesets which should be kept in the database. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Xapian::DatabaseReplicator | |
static DatabaseReplicator * | open (const std::string &path) |
Open a DatabaseReplicator for the given path. More... | |
Protected Member Functions inherited from Xapian::DatabaseReplicator | |
DatabaseReplicator () | |
Constructor to allow construction of subclasses from the open() method. More... | |
Definition at line 29 of file chert_databasereplicator.h.
|
explicit |
Definition at line 61 of file chert_databasereplicator.cc.
References max_changesets.
|
virtual |
Virtual methods of DatabaseReplicator.
Implements Xapian::DatabaseReplicator.
Definition at line 211 of file chert_databasereplicator.cc.
References AssertEq, CHANGES_MAGIC_STRING, CHANGES_VERSION, CONST_STRLEN, create_changeset_file(), db_dir, RemoteConnection::get_message_chunk(), RemoteConnection::get_message_chunked(), ChertTable::get_open_revision_number(), FlintLock::lock(), LOGCALL, max_changesets, ChertTable::open(), pack_uint(), process_changeset_chunk_base(), process_changeset_chunk_blocks(), REASONABLE_CHANGESET_SIZE, REPL_REPLY_CHANGESET, RETURN, startswith(), Xapian::Internal::str(), FlintLock::SUCCESS, throw_connection_closed_unexpectedly(), FlintLock::throw_databaselockerror(), unpack_string(), unpack_uint(), and write_and_clear_changes().
|
virtual |
Virtual methods of DatabaseReplicator.
Implements Xapian::DatabaseReplicator.
Definition at line 71 of file chert_databasereplicator.cc.
References LOGCALL, RETURN, and unpack_uint().
|
virtual |
Virtual methods of DatabaseReplicator.
Implements Xapian::DatabaseReplicator.
Definition at line 349 of file chert_databasereplicator.cc.
References db_dir, ChertVersion::get_uuid_string(), LOGCALL, ChertVersion::read_and_check(), and RETURN.
|
private |
Process a chunk which holds a base block.
Definition at line 95 of file chert_databasereplicator.cc.
References db_dir, RemoteConnection::get_message_chunk(), io_sync(), io_tmp_rename(), io_write(), O_CLOEXEC, posixy_open, throw_connection_closed_unexpectedly(), unpack_uint(), and write_and_clear_changes().
Referenced by apply_changeset_from_conn().
|
private |
Process a chunk which holds a list of changed blocks in the database.
Definition at line 156 of file chert_databasereplicator.cc.
References db_dir, RemoteConnection::get_message_chunk(), io_sync(), io_write_block(), O_CLOEXEC, posixy_open, REASONABLE_CHANGESET_SIZE, throw_connection_closed_unexpectedly(), unpack_uint(), and write_and_clear_changes().
Referenced by apply_changeset_from_conn().
|
private |
Path of database.
Definition at line 33 of file chert_databasereplicator.h.
Referenced by apply_changeset_from_conn(), get_uuid(), process_changeset_chunk_base(), and process_changeset_chunk_blocks().
|
private |
The maximum number of changesets which should be kept in the database.
Definition at line 37 of file chert_databasereplicator.h.
Referenced by apply_changeset_from_conn(), and ChertDatabaseReplicator().