summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/remove_saver.h
diff options
context:
space:
mode:
authorAdam Cooper <adam.cooper@mongodb.com>2020-04-06 14:29:13 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-25 15:52:22 +0000
commit2f6e5d0f94c06fde943ed6a25a9b7ecf6f774ce5 (patch)
tree0e41a01f69820552ba16a2322795e0173871a0e4 /src/mongo/db/storage/remove_saver.h
parent1880dfa2dedec98cbe05959c587a3380c1cdae68 (diff)
downloadmongo-2f6e5d0f94c06fde943ed6a25a9b7ecf6f774ce5.tar.gz
SERVER-47733 SymmetricEncryptorWindows shouldn't pad when update is called
Diffstat (limited to 'src/mongo/db/storage/remove_saver.h')
-rw-r--r--src/mongo/db/storage/remove_saver.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mongo/db/storage/remove_saver.h b/src/mongo/db/storage/remove_saver.h
index 0704ddb4d49..463fe7f8410 100644
--- a/src/mongo/db/storage/remove_saver.h
+++ b/src/mongo/db/storage/remove_saver.h
@@ -51,7 +51,11 @@ class RemoveSaver {
RemoveSaver& operator=(const RemoveSaver&) = delete;
public:
- RemoveSaver(const std::string& type, const std::string& ns, const std::string& why);
+ class Storage;
+ RemoveSaver(const std::string& type,
+ const std::string& ns,
+ const std::string& why,
+ std::unique_ptr<Storage> storage = std::make_unique<Storage>());
~RemoveSaver();
/**
@@ -77,11 +81,20 @@ public:
}
void file() && = delete;
+ class Storage {
+ public:
+ virtual ~Storage() = default;
+ virtual std::unique_ptr<std::ostream> makeOstream(const boost::filesystem::path& file,
+ const boost::filesystem::path& root);
+ virtual void dumpBuffer() {}
+ };
+
private:
boost::filesystem::path _root;
boost::filesystem::path _file;
std::unique_ptr<DataProtector> _protector;
std::unique_ptr<std::ostream> _out;
+ std::unique_ptr<Storage> _storage;
};
} // namespace mongo