diff options
Diffstat (limited to 'storage/src/vespa/storageapi/message/removelocation.cpp')
-rw-r--r-- | storage/src/vespa/storageapi/message/removelocation.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/storage/src/vespa/storageapi/message/removelocation.cpp b/storage/src/vespa/storageapi/message/removelocation.cpp new file mode 100644 index 00000000000..7b7ed894b2c --- /dev/null +++ b/storage/src/vespa/storageapi/message/removelocation.cpp @@ -0,0 +1,34 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include "removelocation.h" +#include <ostream> + +namespace storage::api { + +IMPLEMENT_COMMAND(RemoveLocationCommand, RemoveLocationReply) +IMPLEMENT_REPLY(RemoveLocationReply) + +RemoveLocationCommand::RemoveLocationCommand(vespalib::stringref documentSelection, + const document::Bucket &bucket) + : BucketInfoCommand(MessageType::REMOVELOCATION, bucket), + _documentSelection(documentSelection) +{} + +RemoveLocationCommand::~RemoveLocationCommand() {} + +void +RemoveLocationCommand::print(std::ostream& out, bool verbose, const std::string& indent) const +{ + if (_documentSelection.length()) { + out << "Remove selection(" << _documentSelection << "): "; + } + BucketInfoCommand::print(out, verbose, indent); +} + +RemoveLocationReply::RemoveLocationReply(const RemoveLocationCommand& cmd, uint32_t docs_removed) + : BucketInfoReply(cmd), + _documents_removed(docs_removed) +{ +} + +} |