summaryrefslogtreecommitdiffstats
path: root/storageapi
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@oath.com>2017-10-18 12:53:21 +0000
committerTor Egge <Tor.Egge@oath.com>2017-10-18 12:53:21 +0000
commit52f05c73d091ccf8c00024a3ca377987eec6d5ee (patch)
treec005610ae8eaaee64bef40951248aaaa95645460 /storageapi
parent00673fd58679212a69a5f51ff255a90c2fff9271 (diff)
Remove DocumentListCommand and DocumentListReply from storage api.
Diffstat (limited to 'storageapi')
-rw-r--r--storageapi/src/vespa/storageapi/message/datagram.cpp56
-rw-r--r--storageapi/src/vespa/storageapi/message/datagram.h52
-rw-r--r--storageapi/src/vespa/storageapi/messageapi/messagehandler.h9
3 files changed, 0 insertions, 117 deletions
diff --git a/storageapi/src/vespa/storageapi/message/datagram.cpp b/storageapi/src/vespa/storageapi/message/datagram.cpp
index 4967c1fd82d..66b753185a4 100644
--- a/storageapi/src/vespa/storageapi/message/datagram.cpp
+++ b/storageapi/src/vespa/storageapi/message/datagram.cpp
@@ -9,8 +9,6 @@ namespace api {
IMPLEMENT_COMMAND(MapVisitorCommand, MapVisitorReply)
IMPLEMENT_REPLY(MapVisitorReply)
-IMPLEMENT_COMMAND(DocumentListCommand, DocumentListReply)
-IMPLEMENT_REPLY(DocumentListReply)
IMPLEMENT_COMMAND(EmptyBucketsCommand, EmptyBucketsReply)
IMPLEMENT_REPLY(EmptyBucketsReply)
@@ -54,52 +52,6 @@ MapVisitorReply::print(std::ostream& out, bool verbose,
}
}
-DocumentListCommand::DocumentListCommand(const document::BucketId& bid)
- : StorageCommand(MessageType::DOCUMENTLIST),
- _bucket(BucketSpace::placeHolder(), bid),
- _documents()
-{
-}
-
-void
-DocumentListCommand::print(std::ostream& out, bool verbose,
- const std::string& indent) const
-{
- out << "DocumentList(" << _bucket.getBucketId();
- if (_documents.empty()) {
- out << ", empty";
- } else if (verbose) {
- out << ",";
- for (uint32_t i=0; i<_documents.size(); ++i) {
- out << "\n" << indent << " ";
- out << ":" << _documents[i];
- }
- } else {
- out << ", " << _documents.size() << " documents";
- }
- out << ")";
- if (verbose) {
- out << " : ";
- StorageCommand::print(out, verbose, indent);
- }
-}
-
-DocumentListReply::DocumentListReply(const DocumentListCommand& cmd)
- : StorageReply(cmd)
-{
-}
-
-void
-DocumentListReply::print(std::ostream& out, bool verbose,
- const std::string& indent) const
-{
- out << "DocumentListReply()";
- if (verbose) {
- out << " : ";
- StorageReply::print(out, verbose, indent);
- }
-}
-
EmptyBucketsCommand::EmptyBucketsCommand(
const std::vector<document::BucketId>& buckets)
: StorageCommand(MessageType::EMPTYBUCKETS),
@@ -143,13 +95,5 @@ EmptyBucketsReply::print(std::ostream& out, bool verbose,
}
}
-std::ostream& operator<<(std::ostream& out, const DocumentListCommand::Entry& e)
-{
- out << e._doc->getId();
- if (e._removeEntry) out << " - removed";
- out << ", last modified at " << e._lastModified;
- return out;
-}
-
} // api
} // storage
diff --git a/storageapi/src/vespa/storageapi/message/datagram.h b/storageapi/src/vespa/storageapi/message/datagram.h
index 32f9bea6a95..64649b43068 100644
--- a/storageapi/src/vespa/storageapi/message/datagram.h
+++ b/storageapi/src/vespa/storageapi/message/datagram.h
@@ -43,58 +43,6 @@ public:
};
/**
- * @class DocumentListCommand
- * @ingroup message
- *
- * @brief Sends a list of documents to the visitor data handler.
- *
- * This is used in synchronization in order to transfer minimal amount of data
- * to the synchronization agent.
- */
-class DocumentListCommand : public StorageCommand {
-public:
- struct Entry {
- document::Document::SP _doc;
- int64_t _lastModified;
- bool _removeEntry;
-
- Entry() : _doc(), _lastModified(0), _removeEntry(false) {}
- Entry(const document::Document::SP& doc, int64_t lastModified,
- bool removeEntry)
- : _doc(doc),
- _lastModified(lastModified),
- _removeEntry(removeEntry)
- { }
- };
-
-private:
- document::Bucket _bucket;
- std::vector<Entry> _documents;
-public:
- DocumentListCommand(const document::BucketId& bid);
- document::Bucket getBucket() const override { return _bucket; }
- std::vector<Entry>& getDocuments() { return _documents; }
- const std::vector<Entry>& getDocuments() const { return _documents; }
- void print(std::ostream& out, bool verbose, const std::string& indent) const override;
- DECLARE_STORAGECOMMAND(DocumentListCommand, onDocumentList)
-};
-
-std::ostream& operator<<(std::ostream& out, const DocumentListCommand::Entry& e);
-
-/**
- * @class DocumentListReply
- * @ingroup message
- *
- * @brief Confirm that a given visitorstatisticscommand has been received.
- */
-class DocumentListReply : public StorageReply {
-public:
- explicit DocumentListReply(const DocumentListCommand&);
- void print(std::ostream& out, bool verbose, const std::string& indent) const override;
- DECLARE_STORAGEREPLY(DocumentListReply, onDocumentListReply)
-};
-
-/**
* @class EmptyBucketsCommand
* @ingroup message
*
diff --git a/storageapi/src/vespa/storageapi/messageapi/messagehandler.h b/storageapi/src/vespa/storageapi/messageapi/messagehandler.h
index 1b9c423e78b..de8af718bcf 100644
--- a/storageapi/src/vespa/storageapi/messageapi/messagehandler.h
+++ b/storageapi/src/vespa/storageapi/messageapi/messagehandler.h
@@ -103,9 +103,6 @@ class StatBucketReply;
class GetBucketListCommand;
class GetBucketListReply;
-class DocumentListCommand;
-class DocumentListReply;
-
class EmptyBucketsCommand;
class EmptyBucketsReply;
@@ -210,12 +207,6 @@ public:
virtual bool onDocumentSummaryReply(
const std::shared_ptr<api::DocumentSummaryReply>&)
{ return false; }
- virtual bool onDocumentList(
- const std::shared_ptr<api::DocumentListCommand>&)
- { return false; }
- virtual bool onDocumentListReply(
- const std::shared_ptr<api::DocumentListReply>&)
- { return false; }
virtual bool onEmptyBuckets(
const std::shared_ptr<api::EmptyBucketsCommand>&)
{ return false; }