xapian-core  1.4.19
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ChertDatabaseReplicator Class Reference

#include <chert_databasereplicator.h>

+ Inheritance diagram for ChertDatabaseReplicator:
+ Collaboration diagram for ChertDatabaseReplicator:

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 DatabaseReplicatoropen (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...
 

Detailed Description

Definition at line 29 of file chert_databasereplicator.h.

Constructor & Destructor Documentation

◆ ChertDatabaseReplicator()

ChertDatabaseReplicator::ChertDatabaseReplicator ( const std::string &  db_dir_)
explicit

Definition at line 61 of file chert_databasereplicator.cc.

References max_changesets.

Member Function Documentation

◆ apply_changeset_from_conn()

string ChertDatabaseReplicator::apply_changeset_from_conn ( RemoteConnection conn,
double  end_time,
bool  valid 
) const
virtual

◆ check_revision_at_least()

bool ChertDatabaseReplicator::check_revision_at_least ( const std::string &  rev,
const std::string &  target 
) const
virtual

Virtual methods of DatabaseReplicator.

Implements Xapian::DatabaseReplicator.

Definition at line 71 of file chert_databasereplicator.cc.

References LOGCALL, RETURN, and unpack_uint().

◆ get_uuid()

string ChertDatabaseReplicator::get_uuid ( ) const
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.

◆ process_changeset_chunk_base()

void ChertDatabaseReplicator::process_changeset_chunk_base ( const std::string &  tablename,
std::string &  buf,
RemoteConnection conn,
double  end_time,
int  changes_fd 
) const
private

◆ process_changeset_chunk_blocks()

void ChertDatabaseReplicator::process_changeset_chunk_blocks ( const std::string &  tablename,
std::string &  buf,
RemoteConnection conn,
double  end_time,
int  changes_fd 
) const
private

Member Data Documentation

◆ db_dir

std::string ChertDatabaseReplicator::db_dir
private

◆ max_changesets

unsigned int ChertDatabaseReplicator::max_changesets
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().


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