diff options
author | Arne H Juul <arnej@yahoo-inc.com> | 2017-04-11 11:45:17 +0200 |
---|---|---|
committer | Arne H Juul <arnej@yahoo-inc.com> | 2017-04-11 11:45:17 +0200 |
commit | f14c5a0ca48e13ac2b92e505a80823d9549d614b (patch) | |
tree | 4c6957cf340a733c2cf4de14c3b68907ad9e3199 | |
parent | b0f588afc76e7dd6ddd7b93a0e0cfdc65c047e80 (diff) |
add override in storage/bucketdb module
6 files changed, 21 insertions, 28 deletions
diff --git a/storage/src/vespa/storage/bucketdb/bucketdatabase.cpp b/storage/src/vespa/storage/bucketdb/bucketdatabase.cpp index 2c229052fc5..596d6cee31e 100644 --- a/storage/src/vespa/storage/bucketdb/bucketdatabase.cpp +++ b/storage/src/vespa/storage/bucketdb/bucketdatabase.cpp @@ -8,7 +8,7 @@ namespace { struct GetNextEntryProcessor : public BucketDatabase::EntryProcessor { BucketDatabase::Entry _entry; - bool process(const BucketDatabase::Entry& e) { + bool process(const BucketDatabase::Entry& e) override { _entry = e; return false; } diff --git a/storage/src/vespa/storage/bucketdb/bucketmanager.h b/storage/src/vespa/storage/bucketdb/bucketmanager.h index c9ae4be8069..64498386466 100644 --- a/storage/src/vespa/storage/bucketdb/bucketmanager.h +++ b/storage/src/vespa/storage/bucketdb/bucketmanager.h @@ -103,8 +103,7 @@ public: void startWorkerThread(); - virtual void print(std::ostream& out, bool verbose, - const std::string& indent) const; + virtual void print(std::ostream& out, bool verbose, const std::string& indent) const override; /** Dump the whole database to the given output. Use for debugging. */ void dump(std::ostream& out) const; @@ -115,25 +114,23 @@ public: private: friend class BucketManagerTest; - void run(framework::ThreadHandle&); + void run(framework::ThreadHandle&) override; // Status::Reporter implementation - vespalib::string getReportContentType( - const framework::HttpUrlPath&) const; - bool reportStatus(std::ostream&, const framework::HttpUrlPath&) const; + vespalib::string getReportContentType(const framework::HttpUrlPath&) const override; + bool reportStatus(std::ostream&, const framework::HttpUrlPath&) const override; /** Event saying node is up and running. We can start to build cache. */ - virtual void onOpen(); - virtual void onDoneInit() { _doneInitialized = true; } - virtual void onClose(); - virtual void onFlush(bool downwards); + virtual void onOpen() override; + virtual void onDoneInit() override { _doneInitialized = true; } + virtual void onClose() override; + virtual void onFlush(bool downwards) override; void updateMetrics(bool updateDocCount); void updateMetrics(const MetricLockGuard &) override { updateMetrics(true); } void updateMinUsedBits(); - bool onRequestBucketInfo( - const std::shared_ptr<api::RequestBucketInfoCommand>&); + bool onRequestBucketInfo(const std::shared_ptr<api::RequestBucketInfoCommand>&) override; bool processRequestBucketInfoCommands(BIList&); /** diff --git a/storage/src/vespa/storage/bucketdb/judyarray.h b/storage/src/vespa/storage/bucketdb/judyarray.h index 1c68e84084c..b5d8a50cb16 100644 --- a/storage/src/vespa/storage/bucketdb/judyarray.h +++ b/storage/src/vespa/storage/bucketdb/judyarray.h @@ -83,8 +83,7 @@ public: data_type& operator[](key_type key); size_type getMemoryUsage() const; - virtual void print(std::ostream& out, bool verbose, - const std::string& indent) const; + virtual void print(std::ostream& out, bool verbose, const std::string& indent) const override; class ConstIterator : public vespalib::Printable { @@ -102,8 +101,7 @@ public: key_type key() const { return _key; } data_type value() const { return *_data; } - virtual void print(std::ostream& out, - bool verbose, const std::string& indent) const; + virtual void print(std::ostream& out, bool verbose, const std::string& indent) const override; protected: // For creating end() iterator diff --git a/storage/src/vespa/storage/bucketdb/lockablemap.h b/storage/src/vespa/storage/bucketdb/lockablemap.h index 2670683f7e3..93dfb23c4db 100644 --- a/storage/src/vespa/storage/bucketdb/lockablemap.h +++ b/storage/src/vespa/storage/bucketdb/lockablemap.h @@ -168,8 +168,7 @@ public: const char* clientId, uint32_t chunkSize = DEFAULT_CHUNK_SIZE); - virtual void print(std::ostream& out, bool verbose, - const std::string& indent) const; + virtual void print(std::ostream& out, bool verbose, const std::string& indent) const override; /** * Returns all buckets in the bucket database that can contain the given diff --git a/storage/src/vespa/storage/bucketdb/mapbucketdatabase.cpp b/storage/src/vespa/storage/bucketdb/mapbucketdatabase.cpp index 243deac5034..a271803714a 100644 --- a/storage/src/vespa/storage/bucketdb/mapbucketdatabase.cpp +++ b/storage/src/vespa/storage/bucketdb/mapbucketdatabase.cpp @@ -465,7 +465,7 @@ namespace { struct Writer : public BucketDatabase::EntryProcessor { std::ostream& _ost; Writer(std::ostream& ost) : _ost(ost) {} - virtual bool process(const BucketDatabase::Entry& e) { + virtual bool process(const BucketDatabase::Entry& e) override { _ost << e.toString() << "\n"; return true; } diff --git a/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.h b/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.h index 94afc5b2e1a..6e9bef38672 100644 --- a/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.h +++ b/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.h @@ -138,23 +138,22 @@ public: ServiceLayerComponentRegister&); ~StorageBucketDBInitializer(); - virtual void print(std::ostream& out, - bool verbose, const std::string& indent) const; + virtual void print(std::ostream& out, bool verbose, const std::string& indent) const override; - virtual void onOpen(); - virtual void onClose(); + virtual void onOpen() override; + virtual void onClose() override; - virtual void run(framework::ThreadHandle&); + virtual void run(framework::ThreadHandle&) override; - bool onDown(const std::shared_ptr<api::StorageMessage>&); - bool onInternalReply(const std::shared_ptr<api::InternalReply>&); + bool onDown(const std::shared_ptr<api::StorageMessage>&) override; + bool onInternalReply(const std::shared_ptr<api::InternalReply>&) override; void handleReadBucketListReply(ReadBucketListReply&); void handleReadBucketInfoReply(ReadBucketInfoReply&); void handleInternalBucketJoinReply(InternalBucketJoinReply&); /** Status implementation. */ - void reportHtmlStatus(std::ostream&, const framework::HttpUrlPath&) const; + void reportHtmlStatus(std::ostream&, const framework::HttpUrlPath&) const override; // The below functions should only be called by the class itself, but they // are left public for easability of access for unit tests and anonymous |