summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/base_cloner.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/base_cloner.h')
-rw-r--r--src/mongo/db/repl/base_cloner.h76
1 files changed, 37 insertions, 39 deletions
diff --git a/src/mongo/db/repl/base_cloner.h b/src/mongo/db/repl/base_cloner.h
index 8d6b8be8928..c6de09f8d31 100644
--- a/src/mongo/db/repl/base_cloner.h
+++ b/src/mongo/db/repl/base_cloner.h
@@ -34,51 +34,49 @@
namespace mongo {
namespace repl {
+/**
+ * Used by cloner test fixture to centralize life cycle testing.
+ *
+ * Life cycle interface for collection and database cloners.
+ */
+class BaseCloner {
+public:
/**
- * Used by cloner test fixture to centralize life cycle testing.
- *
- * Life cycle interface for collection and database cloners.
+ * Callback function to report final status of cloning.
*/
- class BaseCloner {
- public:
-
- /**
- * Callback function to report final status of cloning.
- */
- using CallbackFn = stdx::function<void (const Status&)>;
+ using CallbackFn = stdx::function<void(const Status&)>;
- virtual ~BaseCloner() { }
+ virtual ~BaseCloner() {}
- /**
- * Returns diagnostic information.
- */
- virtual std::string getDiagnosticString() const = 0;
-
- /**
- * Returns true if the cloner has been started (but has not completed).
- */
- virtual bool isActive() const = 0;
+ /**
+ * Returns diagnostic information.
+ */
+ virtual std::string getDiagnosticString() const = 0;
- /**
- * Starts cloning by scheduling initial command to be run by the executor.
- */
- virtual Status start() = 0;
+ /**
+ * Returns true if the cloner has been started (but has not completed).
+ */
+ virtual bool isActive() const = 0;
- /**
- * Cancels current remote command request.
- * Returns immediately if cloner is not active.
- *
- * Callback function may be invoked with an ErrorCodes::CallbackCanceled status.
- */
- virtual void cancel() = 0;
+ /**
+ * Starts cloning by scheduling initial command to be run by the executor.
+ */
+ virtual Status start() = 0;
- /**
- * Waits for active remote commands and database worker to complete.
- * Returns immediately if cloner is not active.
- */
- virtual void wait() = 0;
+ /**
+ * Cancels current remote command request.
+ * Returns immediately if cloner is not active.
+ *
+ * Callback function may be invoked with an ErrorCodes::CallbackCanceled status.
+ */
+ virtual void cancel() = 0;
- };
+ /**
+ * Waits for active remote commands and database worker to complete.
+ * Returns immediately if cloner is not active.
+ */
+ virtual void wait() = 0;
+};
-} // namespace repl
-} // namespace mongo
+} // namespace repl
+} // namespace mongo