diff options
Diffstat (limited to 'documentapi/src/vespa/documentapi/messagebus/routablefactories50.cpp')
-rw-r--r-- | documentapi/src/vespa/documentapi/messagebus/routablefactories50.cpp | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/documentapi/src/vespa/documentapi/messagebus/routablefactories50.cpp b/documentapi/src/vespa/documentapi/messagebus/routablefactories50.cpp index 120ee1facd0..bb0d8a2e26c 100644 --- a/documentapi/src/vespa/documentapi/messagebus/routablefactories50.cpp +++ b/documentapi/src/vespa/documentapi/messagebus/routablefactories50.cpp @@ -852,52 +852,4 @@ RoutableFactories50::WrongDistributionReplyFactory::doEncode(const DocumentReply return true; } -void -RoutableFactories50::FeedMessageFactory::myDecode(FeedMessage &msg, document::ByteBuffer &buf) const -{ - msg.setName(decodeString(buf)); - msg.setGeneration(decodeInt(buf)); - msg.setIncrement(decodeInt(buf)); -} - -void -RoutableFactories50::FeedMessageFactory::myEncode(const FeedMessage &msg, vespalib::GrowableByteBuffer &buf) const -{ - buf.putString(msg.getName()); - buf.putInt(msg.getGeneration()); - buf.putInt(msg.getIncrement()); -} - -DocumentReply::UP -RoutableFactories50::FeedReplyFactory::doDecode(document::ByteBuffer &buf) const -{ - auto reply = std::make_unique<FeedReply>(getType()); - - std::vector<FeedAnswer> &answers = reply->getFeedAnswers(); - int32_t len = decodeInt(buf); - answers.reserve(len); - for (int32_t i = 0; i < len; ++i) { - int32_t typeCode = decodeInt(buf); - int32_t wantedIncrement = decodeInt(buf); - string recipient = decodeString(buf); - string moreInfo = decodeString(buf); - answers.emplace_back(typeCode, wantedIncrement, recipient, moreInfo); - } - return reply; -} - -bool -RoutableFactories50::FeedReplyFactory::doEncode(const DocumentReply &obj, vespalib::GrowableByteBuffer &buf) const -{ - const FeedReply &reply = static_cast<const FeedReply&>(obj); - buf.putInt(reply.getFeedAnswers().size()); - for (const auto & answer : reply.getFeedAnswers()) { - buf.putInt(answer.getAnswerCode()); - buf.putInt(answer.getWantedIncrement()); - buf.putString(answer.getRecipient()); - buf.putString(answer.getMoreInfo()); - } - return true; -} - } |