diff options
author | Misha Tyulenev <misha.tyulenev@mongodb.com> | 2015-06-19 10:28:48 -0400 |
---|---|---|
committer | Misha Tyulenev <misha.tyulenev@mongodb.com> | 2015-06-19 11:07:47 -0400 |
commit | 8c56e2d96b98154b65e3889cd157e648df6ddf77 (patch) | |
tree | 54f0abdbcb6c1dcefff79ade0dee99a6e768e329 /src/mongo/rpc/legacy_reply_builder.cpp | |
parent | 24e96291fa06521483deac6d5a049be66e00f8c5 (diff) | |
download | mongo-8c56e2d96b98154b65e3889cd157e648df6ddf77.tar.gz |
SERVER-18929: Compute available space for output docs in CommandReplyBuilder
Diffstat (limited to 'src/mongo/rpc/legacy_reply_builder.cpp')
-rw-r--r-- | src/mongo/rpc/legacy_reply_builder.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/rpc/legacy_reply_builder.cpp b/src/mongo/rpc/legacy_reply_builder.cpp index e95c6ceff8b..0712c0d5fee 100644 --- a/src/mongo/rpc/legacy_reply_builder.cpp +++ b/src/mongo/rpc/legacy_reply_builder.cpp @@ -98,6 +98,7 @@ namespace rpc { _state = State::kMetadata; } + std::unique_ptr<Message> LegacyReplyBuilder::done() { invariant(_state == State::kOutputDocs); std::unique_ptr<Message> message = stdx::make_unique<Message>(); @@ -117,5 +118,11 @@ namespace rpc { return std::move(message); } + std::size_t LegacyReplyBuilder::availableSpaceForOutputDocs() const { + invariant (State::kDone != _state); + // LegacyReplyBuilder currently does not support addOutputDoc(s) + return 0u; + } + } // namespace rpc } // namespace mongo |