diff options
Diffstat (limited to 'storageapi')
8 files changed, 37 insertions, 39 deletions
diff --git a/storageapi/src/vespa/storageapi/message/bucket.cpp b/storageapi/src/vespa/storageapi/message/bucket.cpp index 08057039cb1..faeae1c79fb 100644 --- a/storageapi/src/vespa/storageapi/message/bucket.cpp +++ b/storageapi/src/vespa/storageapi/message/bucket.cpp @@ -134,6 +134,11 @@ MergeBucketCommand::print(std::ostream& out, bool verbose, } } +std::ostream& +operator<<(std::ostream& out, const MergeBucketCommand::Node& n) { + return out << n.index << (n.sourceOnly ? " (source only)" : ""); +} + MergeBucketReply::MergeBucketReply(const MergeBucketCommand& cmd) : BucketReply(cmd), _nodes(cmd.getNodes()), diff --git a/storageapi/src/vespa/storageapi/message/bucket.h b/storageapi/src/vespa/storageapi/message/bucket.h index b47aa01c63e..7f5ba157d3d 100644 --- a/storageapi/src/vespa/storageapi/message/bucket.h +++ b/storageapi/src/vespa/storageapi/message/bucket.h @@ -152,10 +152,8 @@ public: DECLARE_STORAGECOMMAND(MergeBucketCommand, onMergeBucket) }; -inline std::ostream& -operator<<(std::ostream& out, const MergeBucketCommand::Node& n) { - return out << n.index << (n.sourceOnly ? " (source only)" : ""); -} +std::ostream& +operator<<(std::ostream& out, const MergeBucketCommand::Node& n); /** * @class MergeBucketReply diff --git a/storageapi/src/vespa/storageapi/message/datagram.cpp b/storageapi/src/vespa/storageapi/message/datagram.cpp index bc0dadc3fb3..8d93bc68944 100644 --- a/storageapi/src/vespa/storageapi/message/datagram.cpp +++ b/storageapi/src/vespa/storageapi/message/datagram.cpp @@ -185,5 +185,13 @@ 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 69563bb32f8..0af2cbd3724 100644 --- a/storageapi/src/vespa/storageapi/message/datagram.h +++ b/storageapi/src/vespa/storageapi/message/datagram.h @@ -152,14 +152,7 @@ public: }; -inline 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; -} +std::ostream& operator<<(std::ostream& out, const DocumentListCommand::Entry& e); /** * @class DocumentListReply diff --git a/storageapi/src/vespa/storageapi/message/stat.cpp b/storageapi/src/vespa/storageapi/message/stat.cpp index e006b95ed16..483060318b9 100644 --- a/storageapi/src/vespa/storageapi/message/stat.cpp +++ b/storageapi/src/vespa/storageapi/message/stat.cpp @@ -98,5 +98,13 @@ GetBucketListReply::print(std::ostream& out, bool verbose, } } +std::ostream& +operator<<(std::ostream& out, const GetBucketListReply::BucketInfo& instance) +{ + out << "BucketInfo(" << instance._bucket << ": " + << instance._bucketInformation << ")"; + return out; +} + } // api } // storage diff --git a/storageapi/src/vespa/storageapi/message/stat.h b/storageapi/src/vespa/storageapi/message/stat.h index dbad3e9cd7b..063aa579057 100644 --- a/storageapi/src/vespa/storageapi/message/stat.h +++ b/storageapi/src/vespa/storageapi/message/stat.h @@ -105,13 +105,7 @@ public: }; -inline std::ostream& operator<<(std::ostream& out, - const GetBucketListReply::BucketInfo& instance) -{ - out << "BucketInfo(" << instance._bucket << ": " - << instance._bucketInformation << ")"; - return out; -} +std::ostream& operator<<(std::ostream& out, const GetBucketListReply::BucketInfo& instance); } // api } // storage diff --git a/storageapi/src/vespa/storageapi/message/visitor.cpp b/storageapi/src/vespa/storageapi/message/visitor.cpp index f2ffab76326..3dee0e2e4fb 100644 --- a/storageapi/src/vespa/storageapi/message/visitor.cpp +++ b/storageapi/src/vespa/storageapi/message/visitor.cpp @@ -223,5 +223,10 @@ VisitorInfoReply::print(std::ostream& out, bool verbose, } } +std::ostream& +operator<<(std::ostream& out, const VisitorInfoCommand::BucketTimestampPair& pair) { + return out << pair.bucketId << " - " << pair.timestamp; +} + } // api } // storage diff --git a/storageapi/src/vespa/storageapi/message/visitor.h b/storageapi/src/vespa/storageapi/message/visitor.h index 10e7aa65e40..91e1278ecc4 100644 --- a/storageapi/src/vespa/storageapi/message/visitor.h +++ b/storageapi/src/vespa/storageapi/message/visitor.h @@ -113,8 +113,7 @@ public: uint32_t getMaxBucketsPerVisitor() const { return _maxBucketsPerVisitor; } - void print(std::ostream& out, bool verbose, - const std::string& indent) const; + void print(std::ostream& out, bool verbose, const std::string& indent) const override; virtual StorageCommand::UP createCopyToForward( const document::BucketId&, uint64_t timestamp) const; @@ -136,8 +135,7 @@ private: public: explicit CreateVisitorReply(const CreateVisitorCommand& cmd); - void print(std::ostream& out, bool verbose, - const std::string& indent) const; + void print(std::ostream& out, bool verbose, const std::string& indent) const override; void setLastBucket(const document::BucketId& lastBucket) { _lastBucket = lastBucket; } @@ -165,8 +163,7 @@ public: const vespalib::string & getInstanceId() const { return _instanceId; } - void print(std::ostream& out, bool verbose, - const std::string& indent) const; + void print(std::ostream& out, bool verbose, const std::string& indent) const override; DECLARE_STORAGECOMMAND(DestroyVisitorCommand, onDestroyVisitor) }; @@ -181,8 +178,7 @@ class DestroyVisitorReply : public StorageReply { public: explicit DestroyVisitorReply(const DestroyVisitorCommand& cmd); - void print(std::ostream& out, bool verbose, - const std::string& indent) const; + void print(std::ostream& out, bool verbose, const std::string& indent) const override; DECLARE_STORAGEREPLY(DestroyVisitorReply, onDestroyVisitorReply) }; @@ -237,29 +233,20 @@ public: { return _bucketsCompleted; } bool visitorCompleted() const { return _completed; } - void print(std::ostream& out, bool verbose, - const std::string& indent) const; + void print(std::ostream& out, bool verbose, const std::string& indent) const override; DECLARE_STORAGECOMMAND(VisitorInfoCommand, onVisitorInfo) }; -inline std::ostream& -operator<<(std::ostream& out, - const VisitorInfoCommand::BucketTimestampPair& pair) -{ - return out << pair.bucketId << " - " << pair.timestamp; -} +std::ostream& operator<<(std::ostream& out, const VisitorInfoCommand::BucketTimestampPair& pair); class VisitorInfoReply : public StorageReply { bool _completed; public: VisitorInfoReply(const VisitorInfoCommand& cmd); - bool visitorCompleted() const { return _completed; } - - void print(std::ostream& out, bool verbose, - const std::string& indent) const; + void print(std::ostream& out, bool verbose, const std::string& indent) const override; DECLARE_STORAGEREPLY(VisitorInfoReply, onVisitorInfoReply) }; |