00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef XAPIAN_INCLUDED_CHERT_DATABASEREPLICATOR_H
00025 #define XAPIAN_INCLUDED_CHERT_DATABASEREPLICATOR_H
00026
00027 #include "databasereplicator.h"
00028
00029 class ChertDatabaseReplicator : public Xapian::DatabaseReplicator {
00030 private:
00033 std::string db_dir;
00034
00037 unsigned int max_changesets;
00038
00041 void process_changeset_chunk_base(const std::string & tablename,
00042 std::string & buf,
00043 RemoteConnection & conn,
00044 double end_time,
00045 int changes_fd) const;
00046
00050 void process_changeset_chunk_blocks(const std::string & tablename,
00051 std::string & buf,
00052 RemoteConnection & conn,
00053 double end_time,
00054 int changes_fd) const;
00055
00056 public:
00057 ChertDatabaseReplicator(const std::string & db_dir_);
00058
00061 bool check_revision_at_least(const std::string & rev,
00062 const std::string & target) const;
00063 std::string apply_changeset_from_conn(RemoteConnection & conn,
00064 double end_time,
00065 bool valid) const;
00066 std::string get_uuid() const;
00068 };
00069
00070 #endif