diff options
author | Arne H Juul <arnej@yahoo-inc.com> | 2017-04-11 11:45:20 +0200 |
---|---|---|
committer | Arne H Juul <arnej@yahoo-inc.com> | 2017-04-11 11:45:20 +0200 |
commit | 0dbec29bc680b60af738ff148e470281f5e13d21 (patch) | |
tree | 95298313c125a0d92de06f7e87a23441f39dae6a /storage | |
parent | 6cdb07be0407947d6b7a5b306201543106781239 (diff) |
add override in storage/storageserver module
Diffstat (limited to 'storage')
10 files changed, 68 insertions, 75 deletions
diff --git a/storage/src/vespa/storage/storageserver/bucketintegritychecker.h b/storage/src/vespa/storage/storageserver/bucketintegritychecker.h index 47173bedcda..6b87be804d0 100644 --- a/storage/src/vespa/storage/storageserver/bucketintegritychecker.h +++ b/storage/src/vespa/storage/storageserver/bucketintegritychecker.h @@ -49,8 +49,7 @@ struct SchedulingOptions : public document::Printable { for (uint32_t i=0; i<7; ++i) { _dailyStates[i] = RUN_FULL; } } - 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; }; @@ -113,10 +112,9 @@ public: ServiceLayerComponentRegister&); ~BucketIntegrityChecker(); - virtual void onClose(); + virtual void onClose() override; - 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; SchedulingOptions& getSchedulingOptions() { return _scheduleOptions; } @@ -133,26 +131,26 @@ public: framework::Clock& getClock() { return _component.getClock(); } private: - virtual void configure(std::unique_ptr<vespa::config::content::core::StorIntegritycheckerConfig>); + virtual void configure(std::unique_ptr<vespa::config::content::core::StorIntegritycheckerConfig>) override; - void onDoneInit(); + void onDoneInit() override; - bool onInternalReply(const std::shared_ptr<api::InternalReply>&); - bool onSetSystemState(const std::shared_ptr<api::SetSystemStateCommand>&); + bool onInternalReply(const std::shared_ptr<api::InternalReply>&) override; + bool onSetSystemState(const std::shared_ptr<api::SetSystemStateCommand>&) override; bool onNotifyBucketChangeReply( - const std::shared_ptr<api::NotifyBucketChangeReply>&) + const std::shared_ptr<api::NotifyBucketChangeReply>&) override { return true; } SchedulingOptions::RunState getCurrentRunState( framework::SecondTime time) const; - virtual void run(framework::ThreadHandle&); + virtual void run(framework::ThreadHandle&) override; uint32_t getTotalPendingCount() const; // Status::Reporter implementation virtual void reportHtmlStatus(std::ostream&, - const framework::HttpUrlPath&) const; + const framework::HttpUrlPath&) const override; }; diff --git a/storage/src/vespa/storage/storageserver/communicationmanager.h b/storage/src/vespa/storage/storageserver/communicationmanager.h index 916a92247da..31100de78d1 100644 --- a/storage/src/vespa/storage/storageserver/communicationmanager.h +++ b/storage/src/vespa/storage/storageserver/communicationmanager.h @@ -141,8 +141,8 @@ private: typedef std::vector< std::pair<framework::SecondTime, mbus::IProtocol::SP> > Protocols; Protocols _earlierGenerations; - void onOpen(); - void onClose(); + void onOpen() override; + void onClose() override; void process(const std::shared_ptr<api::StorageMessage>& msg); @@ -151,7 +151,7 @@ private: void configureMessageBusLimits(const CommunicationManagerConfig& cfg); - void configure(std::unique_ptr<CommunicationManagerConfig> config); + void configure(std::unique_ptr<CommunicationManagerConfig> config) override; void receiveStorageReply(const std::shared_ptr<api::StorageReply>&); @@ -201,7 +201,7 @@ public: * From StorageLink. Called when messages arrive from storage * modules. Will convert and dispatch messages to MessageServer */ - virtual bool onUp(const std::shared_ptr<api::StorageMessage>&); + virtual bool onUp(const std::shared_ptr<api::StorageMessage>&) override; bool sendCommand(const std::shared_ptr<api::StorageCommand>& command); @@ -210,19 +210,18 @@ public: void sendMessageBusReply(StorageTransportContext& context, const std::shared_ptr<api::StorageReply>& reply); // Pump thread - void run(framework::ThreadHandle&); + void run(framework::ThreadHandle&) override; - 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; /** Get messages from messagebus. */ - void handleMessage(std::unique_ptr<mbus::Message> msg); + void handleMessage(std::unique_ptr<mbus::Message> msg) override; void sendMessageBusMessage(const std::shared_ptr<api::StorageCommand>& msg, std::unique_ptr<mbus::Message> mbusMsg, const mbus::Route& route); /** Get replies from messagebus. */ - void handleReply(std::unique_ptr<mbus::Reply> msg); + void handleReply(std::unique_ptr<mbus::Reply> msg) override; void updateMessagebusProtocol(const document::DocumentTypeRepo::SP &repo); diff --git a/storage/src/vespa/storage/storageserver/distributornode.h b/storage/src/vespa/storage/storageserver/distributornode.h index c0b6db67b95..03792d8fb56 100644 --- a/storage/src/vespa/storage/storageserver/distributornode.h +++ b/storage/src/vespa/storage/storageserver/distributornode.h @@ -41,19 +41,19 @@ public: StorageLink::UP communicationManager = StorageLink::UP()); ~DistributorNode(); - virtual const lib::NodeType& getNodeType() const + virtual const lib::NodeType& getNodeType() const override { return lib::NodeType::DISTRIBUTOR; } - virtual ResumeGuard pause(); + virtual ResumeGuard pause() override; void handleConfigChange(vespa::config::content::core::StorDistributormanagerConfig&); void handleConfigChange(vespa::config::content::core::StorVisitordispatcherConfig&); private: - virtual void initializeNodeSpecific(); - virtual StorageLink::UP createChain(); + virtual void initializeNodeSpecific() override; + virtual StorageLink::UP createChain() override; - virtual api::Timestamp getUniqueTimestamp(); + virtual api::Timestamp getUniqueTimestamp() override; /** * Shut down necessary distributor-specific components before shutting diff --git a/storage/src/vespa/storage/storageserver/mergethrottler.cpp b/storage/src/vespa/storage/storageserver/mergethrottler.cpp index c8cfd7f3214..ebfa10fe814 100644 --- a/storage/src/vespa/storage/storageserver/mergethrottler.cpp +++ b/storage/src/vespa/storage/storageserver/mergethrottler.cpp @@ -35,10 +35,10 @@ class DummyMbusMessage : public Base private: static const mbus::string NAME; public: - const mbus::string& getProtocol() const { return NAME; } - uint32_t getType() const { return 0x1badb007; } + const mbus::string& getProtocol() const override { return NAME; } + uint32_t getType() const override { return 0x1badb007; } - uint8_t priority() const { return 255; } + uint8_t priority() const override { return 255; } }; template <typename Base> diff --git a/storage/src/vespa/storage/storageserver/mergethrottler.h b/storage/src/vespa/storage/storageserver/mergethrottler.h index c58c11d48e0..8ee4ca7be71 100644 --- a/storage/src/vespa/storage/storageserver/mergethrottler.h +++ b/storage/src/vespa/storage/storageserver/mergethrottler.h @@ -245,15 +245,15 @@ public: ~MergeThrottler(); /** Implements document::Runnable::run */ - void run(framework::ThreadHandle&); + void run(framework::ThreadHandle&) override; - void onOpen(); - void onClose(); - void onFlush(bool downwards); - bool onUp(const std::shared_ptr<api::StorageMessage>& msg); - bool onDown(const std::shared_ptr<api::StorageMessage>& msg); + void onOpen() override; + void onClose() override; + void onFlush(bool downwards) override; + bool onUp(const std::shared_ptr<api::StorageMessage>& msg) override; + bool onDown(const std::shared_ptr<api::StorageMessage>& msg) override; - bool onSetSystemState(const std::shared_ptr<api::SetSystemStateCommand>& stateCmd); + bool onSetSystemState(const std::shared_ptr<api::SetSystemStateCommand>& stateCmd) override; // For unit testing only const ActiveMergeMap& getActiveMerges() const { return _merges; } @@ -270,11 +270,10 @@ public: std::size_t getMaxQueueSize() const { return _maxQueueSize; } - 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; // HtmlStatusReporter implementation - void reportHtmlStatus(std::ostream&, const framework::HttpUrlPath&) const; + void reportHtmlStatus(std::ostream&, const framework::HttpUrlPath&) const override; private: friend class ThreadRendezvousGuard; // impl in .cpp file @@ -328,7 +327,7 @@ private: /** * Callback method for config system (IFetcherCallback) */ - void configure(std::unique_ptr<vespa::config::content::core::StorServerConfig> newConfig); + void configure(std::unique_ptr<vespa::config::content::core::StorServerConfig> newConfig) override; // NOTE: unless explicitly specified, all the below functions require // _sync lock to be held upon call (usually implicitly via MessageGuard) diff --git a/storage/src/vespa/storage/storageserver/opslogger.h b/storage/src/vespa/storage/storageserver/opslogger.h index 6f6b52c4607..57f304a04aa 100644 --- a/storage/src/vespa/storage/storageserver/opslogger.h +++ b/storage/src/vespa/storage/storageserver/opslogger.h @@ -26,21 +26,20 @@ public: const config::ConfigUri & configUri); ~OpsLogger(); - void onClose(); + void onClose() override; - 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; - bool onPutReply(const std::shared_ptr<api::PutReply>& msg); - bool onUpdateReply(const std::shared_ptr<api::UpdateReply>& msg); - bool onRemoveReply(const std::shared_ptr<api::RemoveReply>& msg); - bool onGetReply(const std::shared_ptr<api::GetReply>& msg); + bool onPutReply(const std::shared_ptr<api::PutReply>& msg) override; + bool onUpdateReply(const std::shared_ptr<api::UpdateReply>& msg) override; + bool onRemoveReply(const std::shared_ptr<api::RemoveReply>& msg) override; + bool onGetReply(const std::shared_ptr<api::GetReply>& msg) override; /** Ignore all replies on the way down the storage chain. */ - bool onDown(const std::shared_ptr<api::StorageMessage>&) + bool onDown(const std::shared_ptr<api::StorageMessage>&) override { return false; }; - void configure(std::unique_ptr<vespa::config::content::core::StorOpsloggerConfig> config); + void configure(std::unique_ptr<vespa::config::content::core::StorOpsloggerConfig> config) override; private: vespalib::Lock _lock; diff --git a/storage/src/vespa/storage/storageserver/priorityconverter.h b/storage/src/vespa/storage/storageserver/priorityconverter.h index 5e7eb54acf9..62e476606bc 100644 --- a/storage/src/vespa/storage/storageserver/priorityconverter.h +++ b/storage/src/vespa/storage/storageserver/priorityconverter.h @@ -25,7 +25,7 @@ public: /** Converts the given priority into a document api priority number. */ documentapi::Priority::Value toDocumentPriority(uint8_t) const; - void configure(std::unique_ptr<Config> config); + void configure(std::unique_ptr<Config> config) override; private: static_assert(documentapi::Priority::PRI_ENUM_SIZE == 16, diff --git a/storage/src/vespa/storage/storageserver/statemanager.h b/storage/src/vespa/storage/storageserver/statemanager.h index 537ecec2e72..028168937b5 100644 --- a/storage/src/vespa/storage/storageserver/statemanager.h +++ b/storage/src/vespa/storage/storageserver/statemanager.h @@ -67,27 +67,25 @@ public: std::unique_ptr<HostInfo>, bool testMode = false); ~StateManager(); - void onOpen(); - void onClose(); + void onOpen() override; + void onClose() override; void tick(); - 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; /** Implementation of HtmlStatusReporter */ - virtual void reportHtmlStatus(std::ostream&, - const framework::HttpUrlPath&) const; + virtual void reportHtmlStatus(std::ostream&, const framework::HttpUrlPath&) const override; - virtual lib::NodeState::CSP getReportedNodeState() const; - virtual lib::NodeState::CSP getCurrentNodeState() const; - virtual lib::ClusterState::CSP getSystemState() const; + virtual lib::NodeState::CSP getReportedNodeState() const override; + virtual lib::NodeState::CSP getCurrentNodeState() const override; + virtual lib::ClusterState::CSP getSystemState() const override; - virtual void addStateListener(StateListener&); - virtual void removeStateListener(StateListener&); + virtual void addStateListener(StateListener&) override; + virtual void removeStateListener(StateListener&) override; - virtual Lock::SP grabStateChangeLock(); - virtual void setReportedNodeState(const lib::NodeState& state); + virtual Lock::SP grabStateChangeLock() override; + virtual void setReportedNodeState(const lib::NodeState& state) override; void setClusterState(const lib::ClusterState& c); @@ -130,15 +128,15 @@ private: const lib::ClusterState& currentState, const lib::ClusterState& newState) const; - bool onGetNodeState(const std::shared_ptr<api::GetNodeStateCommand>&); - bool onSetSystemState(const std::shared_ptr<api::SetSystemStateCommand>&); + bool onGetNodeState(const std::shared_ptr<api::GetNodeStateCommand>&) override; + bool onSetSystemState(const std::shared_ptr<api::SetSystemStateCommand>&) override; /** * _stateLock MUST NOT be held while calling. */ std::string getNodeInfo() const; - virtual void run(framework::ThreadHandle&); + virtual void run(framework::ThreadHandle&) override; }; diff --git a/storage/src/vespa/storage/storageserver/statereporter.h b/storage/src/vespa/storage/storageserver/statereporter.h index dfef97e85d0..51a9e93a197 100644 --- a/storage/src/vespa/storage/storageserver/statereporter.h +++ b/storage/src/vespa/storage/storageserver/statereporter.h @@ -38,9 +38,9 @@ public: ~StateReporter(); vespalib::string getReportContentType( - const framework::HttpUrlPath&) const; + const framework::HttpUrlPath&) const override; bool reportStatus(std::ostream& out, - const framework::HttpUrlPath& path) const; + const framework::HttpUrlPath& path) const override; private: metrics::MetricManager &_manager; diff --git a/storage/src/vespa/storage/storageserver/storagenode.h b/storage/src/vespa/storage/storageserver/storagenode.h index 3e4a4b7642e..5df29191489 100644 --- a/storage/src/vespa/storage/storageserver/storagenode.h +++ b/storage/src/vespa/storage/storageserver/storagenode.h @@ -81,10 +81,10 @@ public: bool attemptedStopped() const; - virtual void notifyDoneInitializing(); + virtual void notifyDoneInitializing() override; void waitUntilInitialized(uint32_t timeoutSeconds = 15); - void updateMetrics(const MetricLockGuard & guard); + void updateMetrics(const MetricLockGuard & guard) override; /** Updates the document type repo. */ void setNewDocumentRepo(const document::DocumentTypeRepo::SP& repo); @@ -95,7 +95,7 @@ public: */ virtual ResumeGuard pause() = 0; - void requestShutdown(vespalib::stringref reason); + void requestShutdown(vespalib::stringref reason) override; void notifyPartitionDown(int partId, vespalib::stringref reason); @@ -140,10 +140,10 @@ private: std::unique_ptr<StorageLink> _chain; /** Implementation of config callbacks. */ - virtual void configure(std::unique_ptr<vespa::config::content::core::StorServerConfig> config); - virtual void configure(std::unique_ptr<vespa::config::content::UpgradingConfig> config); - virtual void configure(std::unique_ptr<vespa::config::content::StorDistributionConfig> config); - virtual void configure(std::unique_ptr<vespa::config::content::core::StorPrioritymappingConfig>); + virtual void configure(std::unique_ptr<vespa::config::content::core::StorServerConfig> config) override; + virtual void configure(std::unique_ptr<vespa::config::content::UpgradingConfig> config) override; + virtual void configure(std::unique_ptr<vespa::config::content::StorDistributionConfig> config) override; + virtual void configure(std::unique_ptr<vespa::config::content::core::StorPrioritymappingConfig>) override; virtual void configure(std::unique_ptr<document::DocumenttypesConfig> config, bool hasChanged, int64_t generation); void updateUpgradeFlag(const vespa::config::content::UpgradingConfig&); |