Change BackupProgress to be a class

Struct doesn't need addref() or delref() members, though.
This commit is contained in:
Jingyu Zhou 2019-10-01 13:24:28 -07:00
parent 1e0753a327
commit 250137a52f
1 changed files with 5 additions and 1 deletions

View File

@ -30,7 +30,7 @@
#include "flow/FastRef.h"
#include "flow/actorcompiler.h" // This must be the last #include.
struct BackupProgress : NonCopyable, ReferenceCounted<BackupProgress> {
class BackupProgress : NonCopyable, ReferenceCounted<BackupProgress> {
public:
BackupProgress(UID id, const std::map<LogEpoch, std::pair<int, Version>>& epochTagsEndVersions)
: dbgid(id), epochTagsEndVersions(epochTagsEndVersions) {}
@ -51,6 +51,10 @@ public:
// backup [savedVersion + 1, endVersion)
std::map<std::pair<LogEpoch, Version>, std::map<Tag, Version>> getUnfinishedBackup();
void addref() override { ReferenceCounted<BackupProgress>::addref(); }
void delref() override { ReferenceCounted<BackupProgress>::delref(); }
private:
// Returns the previous epoch's EndVersion. Note epoch is not continuous, and
// we often has previous epoch N and current epoch N + 2. In case of consecutive