diff options
author | Adam Cooper <adam.cooper@mongodb.com> | 2020-04-06 14:29:13 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-06-25 15:52:22 +0000 |
commit | 2f6e5d0f94c06fde943ed6a25a9b7ecf6f774ce5 (patch) | |
tree | 0e41a01f69820552ba16a2322795e0173871a0e4 /src/mongo/db/storage/remove_saver.h | |
parent | 1880dfa2dedec98cbe05959c587a3380c1cdae68 (diff) | |
download | mongo-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.h | 15 |
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 |