summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/rollback_source.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/rollback_source.h')
-rw-r--r--src/mongo/db/repl/rollback_source.h95
1 files changed, 47 insertions, 48 deletions
diff --git a/src/mongo/db/repl/rollback_source.h b/src/mongo/db/repl/rollback_source.h
index 304a81717dc..3e8d6f55578 100644
--- a/src/mongo/db/repl/rollback_source.h
+++ b/src/mongo/db/repl/rollback_source.h
@@ -34,57 +34,56 @@
namespace mongo {
- class NamespaceString;
- class OperationContext;
+class NamespaceString;
+class OperationContext;
namespace repl {
- class OplogInterface;
+class OplogInterface;
+
+/**
+ * Interface for rollback-related operations on the sync source.
+ */
+class RollbackSource {
+ MONGO_DISALLOW_COPYING(RollbackSource);
+
+public:
+ RollbackSource() = default;
+
+ virtual ~RollbackSource() = default;
+
+ /**
+ * Returns remote oplog interface.
+ * Read oplog entries with OplogInterface::makeIterator().
+ */
+ virtual const OplogInterface& getOplog() const = 0;
+
+ /**
+ * Returns rollback ID.
+ */
+ virtual int getRollbackId() const = 0;
/**
- * Interface for rollback-related operations on the sync source.
+ * Returns last operation in oplog.
*/
- class RollbackSource {
- MONGO_DISALLOW_COPYING(RollbackSource);
- public:
-
- RollbackSource() = default;
-
- virtual ~RollbackSource() = default;
-
- /**
- * Returns remote oplog interface.
- * Read oplog entries with OplogInterface::makeIterator().
- */
- virtual const OplogInterface& getOplog() const = 0;
-
- /**
- * Returns rollback ID.
- */
- virtual int getRollbackId() const = 0;
-
- /**
- * Returns last operation in oplog.
- */
- virtual BSONObj getLastOperation() const = 0;
-
- /**
- * Fetch a single document from the sync source.
- */
- virtual BSONObj findOne(const NamespaceString& nss, const BSONObj& filter) const = 0;
-
- /**
- * Clones a single collection from the sync source.
- */
- virtual void copyCollectionFromRemote(OperationContext* txn,
- const NamespaceString& nss) const = 0;
-
- /**
- * Returns collection info.
- */
- virtual StatusWith<BSONObj> getCollectionInfo(const NamespaceString& nss) const = 0;
-
- };
-
-} // namespace repl
-} // namespace mongo
+ virtual BSONObj getLastOperation() const = 0;
+
+ /**
+ * Fetch a single document from the sync source.
+ */
+ virtual BSONObj findOne(const NamespaceString& nss, const BSONObj& filter) const = 0;
+
+ /**
+ * Clones a single collection from the sync source.
+ */
+ virtual void copyCollectionFromRemote(OperationContext* txn,
+ const NamespaceString& nss) const = 0;
+
+ /**
+ * Returns collection info.
+ */
+ virtual StatusWith<BSONObj> getCollectionInfo(const NamespaceString& nss) const = 0;
+};
+
+} // namespace repl
+} // namespace mongo