diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-04-03 22:46:03 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-04-04 16:36:18 +0200 |
commit | 37cfa9ab6b103ae733a783cde18c8384e0ace507 (patch) | |
tree | 99b4ec1964a7a392b4aec133c4b20a4a40ab0002 /config | |
parent | 5a48a81c4134bae524aa66e1e49624f678c8b6ce (diff) |
Override
Diffstat (limited to 'config')
46 files changed, 134 insertions, 161 deletions
diff --git a/config/src/vespa/config/common/configcontext.h b/config/src/vespa/config/common/configcontext.h index 20cfbe8711e..c00bceaef47 100644 --- a/config/src/vespa/config/common/configcontext.h +++ b/config/src/vespa/config/common/configcontext.h @@ -15,8 +15,8 @@ class ConfigContext : public IConfigContext public: ConfigContext(const SourceSpec & spec = ServerSpec()); ConfigContext(const TimingValues & timingValues, const SourceSpec & spec = ServerSpec()); - IConfigManager & getManagerInstance(); - void reload(); + IConfigManager & getManagerInstance() override; + void reload() override; private: TimingValues _timingValues; diff --git a/config/src/vespa/config/common/configholder.h b/config/src/vespa/config/common/configholder.h index abcc9c059cd..70330740d45 100644 --- a/config/src/vespa/config/common/configholder.h +++ b/config/src/vespa/config/common/configholder.h @@ -14,11 +14,11 @@ class ConfigHolder : public IConfigHolder public: ConfigHolder(); - ConfigUpdate::UP provide(); - void handle(ConfigUpdate::UP update); - bool wait(uint64_t timeoutInMillis); - bool poll(); - void interrupt(); + ConfigUpdate::UP provide() override; + void handle(ConfigUpdate::UP update) override; + bool wait(uint64_t timeoutInMillis) override; + bool poll() override; + void interrupt() override; public: vespalib::Monitor _monitor; ConfigUpdate::UP _current; diff --git a/config/src/vespa/config/common/configmanager.h b/config/src/vespa/config/common/configmanager.h index 9cd46750959..77ebb0d2772 100644 --- a/config/src/vespa/config/common/configmanager.h +++ b/config/src/vespa/config/common/configmanager.h @@ -25,13 +25,13 @@ public: ~ConfigManager(); // Implements IConfigManager - ConfigSubscription::SP subscribe(const ConfigKey & key, uint64_t timeoutInMillis); + ConfigSubscription::SP subscribe(const ConfigKey & key, uint64_t timeoutInMillis) override; // Implements IConfigManager - void unsubscribe(const ConfigSubscription::SP & subscription); + void unsubscribe(const ConfigSubscription::SP & subscription) override; // Implements IConfigManager - void reload(int64_t generation); + void reload(int64_t generation) override; private: SubscriptionId _idGenerator; diff --git a/config/src/vespa/config/common/misc.cpp b/config/src/vespa/config/common/misc.cpp index 071411f170a..804ca5b24d5 100644 --- a/config/src/vespa/config/common/misc.cpp +++ b/config/src/vespa/config/common/misc.cpp @@ -5,7 +5,6 @@ #include <vespa/vespalib/stllike/asciistream.h> #include <vespa/vespalib/util/exceptions.h> #include <vespa/vespalib/data/slime/slime.h> -#include <vespa/vespalib/data/memory.h> #include "exceptions.h" using vespalib::Memory; @@ -72,7 +71,7 @@ private: Cursor & _dest; public: CopyObjectTraverser(Cursor & dest) : _dest(dest) {} - void field(const Memory & symbol, const Inspector & inspector) { + void field(const Memory & symbol, const Inspector & inspector) override { switch(inspector.type().getId()) { case NIX::ID: _dest.addNix(); @@ -108,7 +107,7 @@ private: Cursor & _dest; public: CopyArrayTraverser(Cursor & dest) : _dest(dest) {} - void entry(size_t idx, const Inspector & inspector) { + void entry(size_t idx, const Inspector & inspector) override { (void) idx; switch(inspector.type().getId()) { case NIX::ID: diff --git a/config/src/vespa/config/common/payload_converter.h b/config/src/vespa/config/common/payload_converter.h index 63a4b0a7964..351e6a4b073 100644 --- a/config/src/vespa/config/common/payload_converter.h +++ b/config/src/vespa/config/common/payload_converter.h @@ -16,8 +16,8 @@ public: PayloadConverter(const vespalib::slime::Inspector & inspector); ~PayloadConverter(); const std::vector<vespalib::string> & convert(); - void field(const vespalib::Memory & symbol, const vespalib::slime::Inspector & inspector); - void entry(size_t idx, const vespalib::slime::Inspector & inspector); + void field(const vespalib::Memory & symbol, const vespalib::slime::Inspector & inspector) override; + void entry(size_t idx, const vespalib::slime::Inspector & inspector) override; private: void printPrefix(); void encode(const vespalib::slime::Inspector & inspector); diff --git a/config/src/vespa/config/common/trace.cpp b/config/src/vespa/config/common/trace.cpp index 5698c60d0e4..ba733e606b7 100644 --- a/config/src/vespa/config/common/trace.cpp +++ b/config/src/vespa/config/common/trace.cpp @@ -10,7 +10,7 @@ namespace config { struct SystemClock : public Clock { - int64_t currentTimeMillis() const { + int64_t currentTimeMillis() const override { fastos::TimeStamp ts(fastos::ClockSystem::now()); return ts.ms(); } diff --git a/config/src/vespa/config/file/filesource.h b/config/src/vespa/config/file/filesource.h index 141d14faf5c..a26089ae9c7 100644 --- a/config/src/vespa/config/file/filesource.h +++ b/config/src/vespa/config/file/filesource.h @@ -1,10 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <string> -#include <vector> -#include <map> -#include <stack> #include <vespa/config/common/source.h> #include <vespa/config/common/iconfigholder.h> #include <vespa/vespalib/stllike/string.h> @@ -29,9 +25,9 @@ private: public: FileSource(const IConfigHolder::SP & holder, const vespalib::string & fileName); - void getConfig(); - void close(); - void reload(int64_t generation); + void getConfig() override; + void close() override; + void reload(int64_t generation) override; }; } // namespace config diff --git a/config/src/vespa/config/file/filesourcefactory.h b/config/src/vespa/config/file/filesourcefactory.h index c38b00aa034..ab42ff994cd 100644 --- a/config/src/vespa/config/file/filesourcefactory.h +++ b/config/src/vespa/config/file/filesourcefactory.h @@ -4,7 +4,6 @@ #include <vespa/config/common/sourcefactory.h> #include <vespa/vespalib/stllike/string.h> - namespace config { class DirSpec; @@ -21,7 +20,7 @@ public: /** * Create source handling config described by key. */ - Source::UP createSource(const IConfigHolder::SP & holder, const ConfigKey & key) const; + Source::UP createSource(const IConfigHolder::SP & holder, const ConfigKey & key) const override; private: vespalib::string _fileName; }; @@ -37,7 +36,7 @@ public: /** * Create source handling config described by key. */ - Source::UP createSource(const IConfigHolder::SP & holder, const ConfigKey & key) const; + Source::UP createSource(const IConfigHolder::SP & holder, const ConfigKey & key) const override; private: vespalib::string _dirName; std::vector<vespalib::string> _fileNames; diff --git a/config/src/vespa/config/frt/connectionfactory.h b/config/src/vespa/config/frt/connectionfactory.h index c2c5bfe0c96..a9ca2155f20 100644 --- a/config/src/vespa/config/frt/connectionfactory.h +++ b/config/src/vespa/config/frt/connectionfactory.h @@ -1,6 +1,7 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once +#include <memory> class FNET_Scheduler; diff --git a/config/src/vespa/config/frt/frtconfigagent.h b/config/src/vespa/config/frt/frtconfigagent.h index b058d184ea0..d8a2e750cc6 100644 --- a/config/src/vespa/config/frt/frtconfigagent.h +++ b/config/src/vespa/config/frt/frtconfigagent.h @@ -26,10 +26,10 @@ class FRTConfigAgent : public ConfigAgent { public: FRTConfigAgent(const IConfigHolder::SP & holder, const TimingValues & timingValues); - void handleResponse(const ConfigRequest & request, ConfigResponse::UP response); - uint64_t getTimeout() const; - uint64_t getWaitTime() const; - const ConfigState & getConfigState() const; + void handleResponse(const ConfigRequest & request, ConfigResponse::UP response) override; + uint64_t getTimeout() const override; + uint64_t getWaitTime() const override; + const ConfigState & getConfigState() const override; private: void handleUpdatedGeneration(const ConfigKey & key, const ConfigState & newState, const ConfigValue & configValue); void handleOKResponse(ConfigResponse::UP response); diff --git a/config/src/vespa/config/frt/frtconfigrequest.h b/config/src/vespa/config/frt/frtconfigrequest.h index ac7f66ffba9..a31ecbcbbb4 100644 --- a/config/src/vespa/config/frt/frtconfigrequest.h +++ b/config/src/vespa/config/frt/frtconfigrequest.h @@ -21,14 +21,14 @@ class FRTConfigRequest : public ConfigRequest { public: typedef std::unique_ptr<FRTConfigRequest> UP; FRTConfigRequest(Connection * connection, const ConfigKey & key); - virtual ~FRTConfigRequest(); + ~FRTConfigRequest(); virtual bool verifyKey(const ConfigKey & key) const = 0; virtual bool verifyState(const ConfigState & state) const = 0; - bool abort(); - bool isAborted() const; - void setError(int errorCode); - const ConfigKey & getKey() const; + bool abort() override; + bool isAborted() const override; + void setError(int errorCode) override; + const ConfigKey & getKey() const override; FRT_RPCRequest* getRequest() { return _request; } virtual ConfigResponse::UP createResponse(FRT_RPCRequest * request) const = 0; @@ -47,9 +47,9 @@ public: const vespalib::string & configMd5, int64_t generation, int64_t serverTimeout); - bool verifyKey(const ConfigKey & key) const; - bool verifyState(const ConfigState & state) const; - ConfigResponse::UP createResponse(FRT_RPCRequest * request) const; + bool verifyKey(const ConfigKey & key) const override; + bool verifyState(const ConfigState & state) const override; + ConfigResponse::UP createResponse(FRT_RPCRequest * request) const override; private: static const vespalib::string REQUEST_TYPES; }; diff --git a/config/src/vespa/config/frt/frtconfigrequestv2.h b/config/src/vespa/config/frt/frtconfigrequestv2.h index d3ed95a26c3..8301bb8b705 100644 --- a/config/src/vespa/config/frt/frtconfigrequestv2.h +++ b/config/src/vespa/config/frt/frtconfigrequestv2.h @@ -22,7 +22,7 @@ public: const vespalib::string & hostName, int64_t serverTimeout, const Trace & trace); - ConfigResponse::UP createResponse(FRT_RPCRequest * request) const; + ConfigResponse::UP createResponse(FRT_RPCRequest * request) const override; }; } diff --git a/config/src/vespa/config/frt/frtconfigrequestv3.h b/config/src/vespa/config/frt/frtconfigrequestv3.h index a8f9580f232..aa5f6778e23 100644 --- a/config/src/vespa/config/frt/frtconfigrequestv3.h +++ b/config/src/vespa/config/frt/frtconfigrequestv3.h @@ -25,7 +25,7 @@ public: const Trace & trace, const VespaVersion & vespaVersion, const CompressionType & compressionType); - ConfigResponse::UP createResponse(FRT_RPCRequest * request) const; + ConfigResponse::UP createResponse(FRT_RPCRequest * request) const override; }; } diff --git a/config/src/vespa/config/frt/frtconfigresponse.h b/config/src/vespa/config/frt/frtconfigresponse.h index 49a7bd8ba58..8e7044cee85 100644 --- a/config/src/vespa/config/frt/frtconfigresponse.h +++ b/config/src/vespa/config/frt/frtconfigresponse.h @@ -23,11 +23,11 @@ public: FRTConfigResponse(FRT_RPCRequest * request); virtual ~FRTConfigResponse(); - bool validateResponse(); - bool hasValidResponse() const; - vespalib::string errorMessage() const; - int errorCode() const; - bool isError() const; + bool validateResponse() override; + bool hasValidResponse() const override; + vespalib::string errorMessage() const override; + int errorCode() const override; + bool isError() const override; virtual const vespalib::string & getResponseTypes() const = 0; private: @@ -45,20 +45,20 @@ private: public: FRTConfigResponseV1(FRT_RPCRequest * request); - const ConfigKey & getKey() const { return _key; } - const ConfigValue & getValue() const { return _value; } - const Trace & getTrace() const { return _trace; } + const ConfigKey & getKey() const override { return _key; } + const ConfigValue & getValue() const override { return _value; } + const Trace & getTrace() const override { return _trace; } - const ConfigState & getConfigState() const { return _state; } + const ConfigState & getConfigState() const override { return _state; } - void fill(); + void fill() override; private: static const vespalib::string RESPONSE_TYPES; const std::vector<vespalib::string> getPayLoad() const; const ConfigKey readKey() const; - const vespalib::string & getResponseTypes() const; + const vespalib::string & getResponseTypes() const override; ConfigKey _key; ConfigValue _value; diff --git a/config/src/vespa/config/frt/frtconfigresponsev2.cpp b/config/src/vespa/config/frt/frtconfigresponsev2.cpp index 53392baa73a..dcd701e2fe9 100644 --- a/config/src/vespa/config/frt/frtconfigresponsev2.cpp +++ b/config/src/vespa/config/frt/frtconfigresponsev2.cpp @@ -1,8 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "frtconfigresponsev2.h" -#include <vespa/config/common/misc.h> #include <vespa/fnet/frt/frt.h> -#include <vespa/vespalib/stllike/string.h> using namespace vespalib; using namespace vespalib::slime; @@ -16,8 +14,7 @@ public: V2Payload(const SlimePtr & data) : _data(data) {} - const Inspector & getSlimePayload() const - { + const Inspector & getSlimePayload() const override { return extractPayload(*_data); } private: diff --git a/config/src/vespa/config/frt/frtconfigresponsev2.h b/config/src/vespa/config/frt/frtconfigresponsev2.h index ce370b3880d..204f982d035 100644 --- a/config/src/vespa/config/frt/frtconfigresponsev2.h +++ b/config/src/vespa/config/frt/frtconfigresponsev2.h @@ -2,11 +2,7 @@ #pragma once #include "slimeconfigresponse.h" -#include <vespa/config/common/configkey.h> #include <vespa/config/common/configvalue.h> -#include <vespa/config/common/trace.h> -#include <vespa/vespalib/data/slime/slime.h> -#include "protocol.h" class FRT_RPCRequest; class FRT_Values; @@ -24,8 +20,8 @@ public: private: static const vespalib::string RESPONSE_TYPES; - const vespalib::string & getResponseTypes() const; - const ConfigValue readConfigValue() const; + const vespalib::string & getResponseTypes() const override; + const ConfigValue readConfigValue() const override; }; } // namespace config diff --git a/config/src/vespa/config/frt/frtconfigresponsev3.cpp b/config/src/vespa/config/frt/frtconfigresponsev3.cpp index 191b1932bf0..be37ad814ab 100644 --- a/config/src/vespa/config/frt/frtconfigresponsev3.cpp +++ b/config/src/vespa/config/frt/frtconfigresponsev3.cpp @@ -1,9 +1,8 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "frtconfigresponsev3.h" #include "compressioninfo.h" -#include <vespa/config/common/misc.h> #include <vespa/fnet/frt/frt.h> -#include <vespa/vespalib/stllike/string.h> + #include <vespa/log/log.h> LOG_SETUP(".config.frt.frtconfigresponsev3"); @@ -30,8 +29,7 @@ public: { } - const Inspector & getSlimePayload() const - { + const Inspector & getSlimePayload() const override { return _data->get(); } private: diff --git a/config/src/vespa/config/frt/frtconfigresponsev3.h b/config/src/vespa/config/frt/frtconfigresponsev3.h index e2b9b9e5286..725d72f67d0 100644 --- a/config/src/vespa/config/frt/frtconfigresponsev3.h +++ b/config/src/vespa/config/frt/frtconfigresponsev3.h @@ -2,11 +2,8 @@ #pragma once #include "slimeconfigresponse.h" -#include <vespa/config/common/configkey.h> #include <vespa/config/common/configvalue.h> -#include <vespa/config/common/trace.h> -#include <vespa/vespalib/data/slime/slime.h> -#include "protocol.h" + class FRT_RPCRequest; class FRT_Values; @@ -24,8 +21,8 @@ public: private: static const vespalib::string RESPONSE_TYPES; - const vespalib::string & getResponseTypes() const; - const ConfigValue readConfigValue() const; + const vespalib::string & getResponseTypes() const override; + const ConfigValue readConfigValue() const override; }; } // namespace config diff --git a/config/src/vespa/config/frt/frtconnection.h b/config/src/vespa/config/frt/frtconnection.h index a8c0b03b288..d0a8163413c 100644 --- a/config/src/vespa/config/frt/frtconnection.h +++ b/config/src/vespa/config/frt/frtconnection.h @@ -35,20 +35,19 @@ public: FRTConnection(const vespalib::string & address, FRT_Supervisor & supervisor, const TimingValues & timingValues); ~FRTConnection(); - FRT_RPCRequest * allocRPCRequest() - { + FRT_RPCRequest * allocRPCRequest() override { return _supervisor.AllocRPCRequest(); } - void invoke(FRT_RPCRequest * req, double timeout, FRT_IRequestWait * waiter); - const vespalib::string & getAddress() const { return _address; } + void invoke(FRT_RPCRequest * req, double timeout, FRT_IRequestWait * waiter) override; + const vespalib::string & getAddress() const override { return _address; } int64_t getSuspendedUntil() { return _suspendedUntil; } - void setError(int errorCode); + void setError(int errorCode) override; void setSuccess(); void calculateSuspension(ErrorType type); int64_t getTransientDelay() { return _transientDelay; } int64_t getMaxTransientDelay() { return getTransientDelay() * 6; } - void setTransientDelay(int64_t delay) { _transientDelay = delay; } + void setTransientDelay(int64_t delay) override { _transientDelay = delay; } int64_t getFatalDelay() { return _fatalDelay; } int64_t getMaxFatalDelay() { return getFatalDelay() * 6; } void setFatalDelay(int64_t delay) { _fatalDelay = delay; } diff --git a/config/src/vespa/config/frt/frtconnectionpool.h b/config/src/vespa/config/frt/frtconnectionpool.h index 28f2ee83557..d5af64bba93 100644 --- a/config/src/vespa/config/frt/frtconnectionpool.h +++ b/config/src/vespa/config/frt/frtconnectionpool.h @@ -1,14 +1,13 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once +#include "frtconnection.h" +#include "connectionfactory.h" +#include <vespa/config/subscription/sourcespec.h> +#include <vespa/fnet/frt/frt.h> #include <vector> #include <string> #include <map> -#include <vespa/fnet/frt/frt.h> -#include "frtconnection.h" -#include <vespa/config/subscription/sourcespec.h> -#include "connectionfactory.h" - namespace config { class FRTConnectionPool : public ConnectionFactory { @@ -43,7 +42,7 @@ public: FRTConnectionPool(const ServerSpec & spec, const TimingValues & timingValues); ~FRTConnectionPool(); - void syncTransport(); + void syncTransport() override; /** * Sets the hostname to the host where this program is running. @@ -57,7 +56,7 @@ public: */ void setHostname(const vespalib::string & hostname) { _hostname = hostname; } - FNET_Scheduler * getScheduler() { return _supervisor.GetScheduler(); } + FNET_Scheduler * getScheduler() override { return _supervisor.GetScheduler(); } /** * Gets the hostname. @@ -81,7 +80,7 @@ public: * * @return The next FRTConnection instance in the list. */ - Connection* getCurrent(); + Connection* getCurrent() override; /** * Returns the next FRTConnection instance from the list of error-free sources in a round robin diff --git a/config/src/vespa/config/frt/frtsource.cpp b/config/src/vespa/config/frt/frtsource.cpp index 7081cbc0e3a..85eda648dc8 100644 --- a/config/src/vespa/config/frt/frtsource.cpp +++ b/config/src/vespa/config/frt/frtsource.cpp @@ -2,9 +2,7 @@ #include "frtconfigrequest.h" #include "frtconfigresponse.h" #include "frtsource.h" -#include "connection.h" #include <vespa/vespalib/util/closuretask.h> -#include <vespa/fnet/frt/frt.h> #include <vespa/log/log.h> LOG_SETUP(".config.frt.frtsource"); @@ -21,12 +19,10 @@ public: _source(source) { } - ~GetConfigTask() - { + ~GetConfigTask() { Kill(); } - void PerformTask() - { + void PerformTask() override { _source->getConfig(); } private: diff --git a/config/src/vespa/config/frt/frtsource.h b/config/src/vespa/config/frt/frtsource.h index 2e20bbc4a1a..653d182707b 100644 --- a/config/src/vespa/config/frt/frtsource.h +++ b/config/src/vespa/config/frt/frtsource.h @@ -1,12 +1,13 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/config/common/source.h> + #include "connectionfactory.h" #include "frtconfigagent.h" +#include "frtconfigrequestfactory.h" #include <vespa/config/common/configkey.h> #include <vespa/config/common/configrequest.h> -#include "frtconfigrequestfactory.h" +#include <vespa/config/common/source.h> #include <vespa/fnet/frt/frt.h> #include <vespa/vespalib/util/sync.h> @@ -23,10 +24,10 @@ public: FRTSource(const ConnectionFactory::SP & connectionFactory, const FRTConfigRequestFactory & requestFactory, ConfigAgent::UP agent, const ConfigKey & key); ~FRTSource(); - void RequestDone(FRT_RPCRequest * request); - void close(); - void reload(int64_t generation); - void getConfig(); + void RequestDone(FRT_RPCRequest * request) override; + void close() override; + void reload(int64_t generation) override; + void getConfig() override; const FRTConfigRequest & getCurrentRequest() const; diff --git a/config/src/vespa/config/frt/frtsourcefactory.h b/config/src/vespa/config/frt/frtsourcefactory.h index a16a628ee1f..fb95d259df7 100644 --- a/config/src/vespa/config/frt/frtsourcefactory.h +++ b/config/src/vespa/config/frt/frtsourcefactory.h @@ -1,10 +1,10 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/config/common/sourcefactory.h> -#include <vespa/config/common/timingvalues.h> #include "connectionfactory.h" #include "frtconfigrequestfactory.h" +#include <vespa/config/common/sourcefactory.h> +#include <vespa/config/common/timingvalues.h> namespace config { @@ -19,7 +19,7 @@ public: /** * Create source handling config described by key. */ - Source::UP createSource(const IConfigHolder::SP & holder, const ConfigKey & key) const; + Source::UP createSource(const IConfigHolder::SP & holder, const ConfigKey & key) const override; private: ConnectionFactory::SP _connectionFactory; diff --git a/config/src/vespa/config/frt/slimeconfigrequest.h b/config/src/vespa/config/frt/slimeconfigrequest.h index af5272597be..878681cf441 100644 --- a/config/src/vespa/config/frt/slimeconfigrequest.h +++ b/config/src/vespa/config/frt/slimeconfigrequest.h @@ -29,10 +29,10 @@ public: int64_t protocolVersion, const CompressionType & compressionType, const vespalib::string & methodName); - virtual ~SlimeConfigRequest() {} - bool verifyKey(const ConfigKey & key) const; - bool verifyState(const ConfigState & state) const; - virtual ConfigResponse::UP createResponse(FRT_RPCRequest * request) const = 0; + ~SlimeConfigRequest() {} + bool verifyKey(const ConfigKey & key) const override; + bool verifyState(const ConfigState & state) const override; + virtual ConfigResponse::UP createResponse(FRT_RPCRequest * request) const override = 0; private: void populateSlimeRequest(const ConfigKey & key, const vespalib::string & configMd5, diff --git a/config/src/vespa/config/frt/slimeconfigresponse.h b/config/src/vespa/config/frt/slimeconfigresponse.h index 4f22f0726bc..5405a3325f3 100644 --- a/config/src/vespa/config/frt/slimeconfigresponse.h +++ b/config/src/vespa/config/frt/slimeconfigresponse.h @@ -22,17 +22,17 @@ private: SlimeConfigResponse& operator=(const SlimeConfigResponse&); public: SlimeConfigResponse(FRT_RPCRequest * request); - virtual ~SlimeConfigResponse() {} + ~SlimeConfigResponse() {} - const ConfigKey & getKey() const { return _key; } - const ConfigValue & getValue() const { return _value; } - const ConfigState & getConfigState() const { return _state; } - const Trace & getTrace() const { return _trace; } + const ConfigKey & getKey() const override { return _key; } + const ConfigValue & getValue() const override { return _value; } + const ConfigState & getConfigState() const override { return _state; } + const Trace & getTrace() const override { return _trace; } vespalib::string getHostName() const; vespalib::string getConfigMd5() const; - void fill(); + void fill() override; protected: virtual const ConfigValue readConfigValue() const = 0; diff --git a/config/src/vespa/config/print/asciiconfigsnapshotreader.h b/config/src/vespa/config/print/asciiconfigsnapshotreader.h index 28120b38b93..ec8d6bef709 100644 --- a/config/src/vespa/config/print/asciiconfigsnapshotreader.h +++ b/config/src/vespa/config/print/asciiconfigsnapshotreader.h @@ -1,8 +1,8 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/vespalib/stllike/asciistream.h> #include "configsnapshotreader.h" +#include <vespa/vespalib/stllike/asciistream.h> namespace config { @@ -18,7 +18,7 @@ public: * * @return Snapshot containing the configs. */ - ConfigSnapshot read(); + ConfigSnapshot read() override; private: const vespalib::asciistream & _is; }; diff --git a/config/src/vespa/config/print/asciiconfigsnapshotwriter.h b/config/src/vespa/config/print/asciiconfigsnapshotwriter.h index f49da791477..88bf557a2d6 100644 --- a/config/src/vespa/config/print/asciiconfigsnapshotwriter.h +++ b/config/src/vespa/config/print/asciiconfigsnapshotwriter.h @@ -1,8 +1,8 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/vespalib/stllike/asciistream.h> #include "configsnapshotwriter.h" +#include <vespa/vespalib/stllike/asciistream.h> namespace config { @@ -12,7 +12,7 @@ namespace config { class AsciiConfigSnapshotWriter : public ConfigSnapshotWriter { public: AsciiConfigSnapshotWriter(vespalib::asciistream & os); - bool write(const ConfigSnapshot & snapshot); + bool write(const ConfigSnapshot & snapshot) override; private: vespalib::asciistream & _os; }; diff --git a/config/src/vespa/config/print/asciiconfigwriter.h b/config/src/vespa/config/print/asciiconfigwriter.h index a22e3608855..61e6169e5b9 100644 --- a/config/src/vespa/config/print/asciiconfigwriter.h +++ b/config/src/vespa/config/print/asciiconfigwriter.h @@ -10,8 +10,8 @@ namespace config { class AsciiConfigWriter : public ConfigWriter { public: AsciiConfigWriter(vespalib::asciistream & os); - bool write(const ConfigInstance & config); - bool write(const ConfigInstance & config, const ConfigFormatter & formatter); + bool write(const ConfigInstance & config) override; + bool write(const ConfigInstance & config, const ConfigFormatter & formatter) override; private: vespalib::asciistream & _os; }; diff --git a/config/src/vespa/config/print/fileconfigformatter.cpp b/config/src/vespa/config/print/fileconfigformatter.cpp index c983572e04a..86cc7be5aa9 100644 --- a/config/src/vespa/config/print/fileconfigformatter.cpp +++ b/config/src/vespa/config/print/fileconfigformatter.cpp @@ -130,8 +130,8 @@ struct ConfigEncoder : public ArrayTraverser, } abort(); // should not be reached } - virtual void entry(size_t idx, const Inspector &inspector); - virtual void field(const Memory &symbol_name, const Inspector &inspector); + void entry(size_t idx, const Inspector &inspector) override; + void field(const Memory &symbol_name, const Inspector &inspector) override; static void encode(Inspector & root, OutputWriter &out) { ConfigEncoder encoder(out); diff --git a/config/src/vespa/config/print/fileconfigformatter.h b/config/src/vespa/config/print/fileconfigformatter.h index 68476bf95b5..8d94eb51a2e 100644 --- a/config/src/vespa/config/print/fileconfigformatter.h +++ b/config/src/vespa/config/print/fileconfigformatter.h @@ -12,9 +12,9 @@ namespace config { class FileConfigFormatter : public ConfigFormatter { public: // Inherits ConfigFormatter - void encode(ConfigDataBuffer & buffer) const; + void encode(ConfigDataBuffer & buffer) const override; // Inherits ConfigFormatter - size_t decode(ConfigDataBuffer & buffer) const; + size_t decode(ConfigDataBuffer & buffer) const override; }; } // namespace config diff --git a/config/src/vespa/config/print/fileconfigsnapshotreader.h b/config/src/vespa/config/print/fileconfigsnapshotreader.h index fdf3dbd303c..1c9e7ae5aea 100644 --- a/config/src/vespa/config/print/fileconfigsnapshotreader.h +++ b/config/src/vespa/config/print/fileconfigsnapshotreader.h @@ -1,8 +1,8 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/vespalib/stllike/string.h> #include "configsnapshotreader.h" +#include <vespa/vespalib/stllike/string.h> namespace config { @@ -18,7 +18,7 @@ public: * * @return Snapshot containing the configs. */ - ConfigSnapshot read(); + ConfigSnapshot read() override; private: const vespalib::string _fileName; }; diff --git a/config/src/vespa/config/print/fileconfigsnapshotwriter.h b/config/src/vespa/config/print/fileconfigsnapshotwriter.h index 104966827be..5d5290073df 100644 --- a/config/src/vespa/config/print/fileconfigsnapshotwriter.h +++ b/config/src/vespa/config/print/fileconfigsnapshotwriter.h @@ -1,8 +1,8 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/vespalib/stllike/string.h> #include "configsnapshotwriter.h" +#include <vespa/vespalib/stllike/string.h> namespace config { @@ -12,7 +12,7 @@ namespace config { class FileConfigSnapshotWriter : public ConfigSnapshotWriter { public: FileConfigSnapshotWriter(const vespalib::string & fileName); - bool write(const ConfigSnapshot & snapshot); + bool write(const ConfigSnapshot & snapshot) override; private: const vespalib::string _fileName; }; diff --git a/config/src/vespa/config/print/fileconfigwriter.h b/config/src/vespa/config/print/fileconfigwriter.h index b79f7456199..df00628ae28 100644 --- a/config/src/vespa/config/print/fileconfigwriter.h +++ b/config/src/vespa/config/print/fileconfigwriter.h @@ -1,9 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/vespalib/stllike/string.h> #include "configwriter.h" #include "configformatter.h" +#include <vespa/vespalib/stllike/string.h> namespace config { @@ -14,8 +14,8 @@ class FileConfigWriter : public ConfigWriter { public: FileConfigWriter(const vespalib::string & fileName); // Implements ConfigWriter - bool write(const ConfigInstance & config); - bool write(const ConfigInstance & config, const ConfigFormatter & formatter); + bool write(const ConfigInstance & config) override; + bool write(const ConfigInstance & config, const ConfigFormatter & formatter) override; private: const vespalib::string _fileName; }; diff --git a/config/src/vespa/config/print/jsonconfigformatter.h b/config/src/vespa/config/print/jsonconfigformatter.h index f1b981870b2..4b37f822c23 100644 --- a/config/src/vespa/config/print/jsonconfigformatter.h +++ b/config/src/vespa/config/print/jsonconfigformatter.h @@ -12,9 +12,9 @@ class JsonConfigFormatter : public ConfigFormatter { public: JsonConfigFormatter(bool compact = false); // Inherits ConfigFormatter - void encode(ConfigDataBuffer & buffer) const; + void encode(ConfigDataBuffer & buffer) const override; // Inherits ConfigFormatter - size_t decode(ConfigDataBuffer & buffer) const; + size_t decode(ConfigDataBuffer & buffer) const override; private: const bool _compact; }; diff --git a/config/src/vespa/config/print/ostreamconfigwriter.cpp b/config/src/vespa/config/print/ostreamconfigwriter.cpp index eda15d9e2c0..04f47fe169b 100644 --- a/config/src/vespa/config/print/ostreamconfigwriter.cpp +++ b/config/src/vespa/config/print/ostreamconfigwriter.cpp @@ -2,6 +2,7 @@ #include "ostreamconfigwriter.h" #include "fileconfigformatter.h" +#include <ostream> namespace config { diff --git a/config/src/vespa/config/print/ostreamconfigwriter.h b/config/src/vespa/config/print/ostreamconfigwriter.h index fa211f9085f..0ecd548dd15 100644 --- a/config/src/vespa/config/print/ostreamconfigwriter.h +++ b/config/src/vespa/config/print/ostreamconfigwriter.h @@ -1,7 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <ostream> #include "configwriter.h" #include "configformatter.h" @@ -14,8 +13,8 @@ class OstreamConfigWriter : public ConfigWriter { public: OstreamConfigWriter(std::ostream & os); - bool write(const ConfigInstance & config); - bool write(const ConfigInstance & config, const ConfigFormatter & formatter); + bool write(const ConfigInstance & config) override; + bool write(const ConfigInstance & config, const ConfigFormatter & formatter) override; private: std::ostream & _os; }; diff --git a/config/src/vespa/config/raw/rawsource.h b/config/src/vespa/config/raw/rawsource.h index b93e58c2111..ec36dd2c47d 100644 --- a/config/src/vespa/config/raw/rawsource.h +++ b/config/src/vespa/config/raw/rawsource.h @@ -14,9 +14,9 @@ class RawSource : public Source { public: RawSource(const IConfigHolder::SP & holder, const vespalib::string & payload); - void getConfig(); - void reload(int64_t generation); - void close(); + void getConfig() override; + void reload(int64_t generation) override; + void close() override; private: IConfigHolder::SP _holder; std::vector<vespalib::string> readConfig(); diff --git a/config/src/vespa/config/raw/rawsourcefactory.h b/config/src/vespa/config/raw/rawsourcefactory.h index e994bb54ba8..62affc6b5d5 100644 --- a/config/src/vespa/config/raw/rawsourcefactory.h +++ b/config/src/vespa/config/raw/rawsourcefactory.h @@ -14,7 +14,7 @@ public: : _payload(payload) { } - Source::UP createSource(const IConfigHolder::SP & holder, const ConfigKey & key) const; + Source::UP createSource(const IConfigHolder::SP & holder, const ConfigKey & key) const override; private: const vespalib::string _payload; }; diff --git a/config/src/vespa/config/retriever/configsnapshot.cpp b/config/src/vespa/config/retriever/configsnapshot.cpp index b46b3f34898..b04f44bf600 100644 --- a/config/src/vespa/config/retriever/configsnapshot.cpp +++ b/config/src/vespa/config/retriever/configsnapshot.cpp @@ -232,14 +232,11 @@ namespace { class FixedPayload : public protocol::Payload { public: - const Inspector & getSlimePayload() const - { + const Inspector & getSlimePayload() const override { return _data.get(); } - Slime & getData() { - return _data; - } + Slime & getData() { return _data; } private: Slime _data; }; diff --git a/config/src/vespa/config/retriever/simpleconfigurer.h b/config/src/vespa/config/retriever/simpleconfigurer.h index 69d4eea545d..ade2731f4bb 100644 --- a/config/src/vespa/config/retriever/simpleconfigurer.h +++ b/config/src/vespa/config/retriever/simpleconfigurer.h @@ -39,7 +39,7 @@ public: */ void close(); - void run(); + void run() override; private: void runConfigure(); diff --git a/config/src/vespa/config/set/configinstancesourcefactory.cpp b/config/src/vespa/config/set/configinstancesourcefactory.cpp index fcf1b0f213b..4674546397d 100644 --- a/config/src/vespa/config/set/configinstancesourcefactory.cpp +++ b/config/src/vespa/config/set/configinstancesourcefactory.cpp @@ -1,8 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "configinstancesourcefactory.h" -#include <vespa/config/common/source.h> -#include <vespa/config/common/misc.h> namespace { @@ -13,14 +11,14 @@ public: _buffer(buffer), _generation(-1) { } - virtual void close() { } - virtual void getConfig() { + void close() override { } + void getConfig() override { std::vector<vespalib::string> lines(_buffer.getlines()); std::string currentMd5(config::calculateContentMd5(lines)); _holder->handle(config::ConfigUpdate::UP(new config::ConfigUpdate(config::ConfigValue(lines, currentMd5), true, _generation))); } - virtual void reload(int64_t generation) { _generation = generation; } + void reload(int64_t generation) override { _generation = generation; } private: config::IConfigHolder::SP _holder; vespalib::asciistream _buffer; diff --git a/config/src/vespa/config/set/configinstancesourcefactory.h b/config/src/vespa/config/set/configinstancesourcefactory.h index 8b1a4c68cbd..9a937d20ff0 100644 --- a/config/src/vespa/config/set/configinstancesourcefactory.h +++ b/config/src/vespa/config/set/configinstancesourcefactory.h @@ -1,8 +1,8 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/config/common/sourcefactory.h> #include "configsetsource.h" +#include <vespa/config/common/sourcefactory.h> #include <vespa/vespalib/stllike/asciistream.h> namespace config { @@ -22,7 +22,7 @@ public: /** * Create source handling config described by key. */ - Source::UP createSource(const IConfigHolder::SP & holder, const ConfigKey & key) const; + Source::UP createSource(const IConfigHolder::SP & holder, const ConfigKey & key) const override; private: const ConfigKey _key; vespalib::asciistream _buffer; diff --git a/config/src/vespa/config/set/configsetsource.h b/config/src/vespa/config/set/configsetsource.h index d2a3d9121ad..2fec684601c 100644 --- a/config/src/vespa/config/set/configsetsource.h +++ b/config/src/vespa/config/set/configsetsource.h @@ -21,9 +21,9 @@ public: ConfigSetSource(const IConfigHolder::SP & holder, const ConfigKey & key, const BuilderMapSP & builderMap); ~ConfigSetSource(); - void getConfig(); - void reload(int64_t generation); - void close(); + void getConfig() override; + void reload(int64_t generation) override; + void close() override; private: IConfigHolder::SP _holder; const ConfigKey _key; diff --git a/config/src/vespa/config/set/configsetsourcefactory.h b/config/src/vespa/config/set/configsetsourcefactory.h index e3bac385e07..9894bf5be16 100644 --- a/config/src/vespa/config/set/configsetsourcefactory.h +++ b/config/src/vespa/config/set/configsetsourcefactory.h @@ -1,8 +1,8 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/config/common/sourcefactory.h> #include "configsetsource.h" +#include <vespa/config/common/sourcefactory.h> namespace config { @@ -23,7 +23,7 @@ public: /** * Create source handling config described by key. */ - Source::UP createSource(const IConfigHolder::SP & holder, const ConfigKey & key) const; + Source::UP createSource(const IConfigHolder::SP & holder, const ConfigKey & key) const override; private: BuilderMapSP _builderMap; }; diff --git a/config/src/vespa/config/subscription/configinstancespec.h b/config/src/vespa/config/subscription/configinstancespec.h index a75f7eea3de..d5b9656d29b 100644 --- a/config/src/vespa/config/subscription/configinstancespec.h +++ b/config/src/vespa/config/subscription/configinstancespec.h @@ -15,7 +15,7 @@ class ConfigInstanceSpec : public SourceSpec { public: ConfigInstanceSpec(const ConfigInstance & instance); - std::unique_ptr<SourceFactory> createSourceFactory(const TimingValues & timingValues) const; + std::unique_ptr<SourceFactory> createSourceFactory(const TimingValues & timingValues) const override; private: const ConfigKey _key; vespalib::asciistream _buffer; diff --git a/config/src/vespa/config/subscription/sourcespec.h b/config/src/vespa/config/subscription/sourcespec.h index f4853928f71..f35e3a48379 100644 --- a/config/src/vespa/config/subscription/sourcespec.h +++ b/config/src/vespa/config/subscription/sourcespec.h @@ -2,8 +2,8 @@ #pragma once -#include <vespa/vespalib/stllike/string.h> #include <vespa/config/common/compressiontype.h> +#include <vespa/vespalib/stllike/string.h> #include <vector> namespace config { @@ -54,7 +54,7 @@ public: RawSpec(const vespalib::string & config); // Implements SourceSpec - SourceFactorySP createSourceFactory(const TimingValues & timingValues) const; + SourceFactorySP createSourceFactory(const TimingValues & timingValues) const override; /** * Returns the string representation of this config. @@ -89,7 +89,7 @@ public: const vespalib::string & getFileName() const { return _fileName; } // Implements SourceSpec - SourceFactorySP createSourceFactory(const TimingValues & timingValues) const; + SourceFactorySP createSourceFactory(const TimingValues & timingValues) const override; private: void verifyName(const vespalib::string & fileName); vespalib::string _fileName; @@ -117,7 +117,7 @@ public: const vespalib::string & getDirName() const { return _dirName; } // Implements SourceSpec - SourceFactorySP createSourceFactory(const TimingValues & timingValues) const; + SourceFactorySP createSourceFactory(const TimingValues & timingValues) const override; private: vespalib::string _dirName; }; @@ -154,7 +154,7 @@ public: ServerSpec(const vespalib::string & hostSpec); // Implements SourceSpec - virtual SourceFactorySP createSourceFactory(const TimingValues & timingValues) const; + virtual SourceFactorySP createSourceFactory(const TimingValues & timingValues) const override; /** * Add another host to this source spec, allowing failover. @@ -229,7 +229,7 @@ public: void addBuilder(const vespalib::string & configId, ConfigInstance * builder); // Implements SourceSpec - SourceFactorySP createSourceFactory(const TimingValues & timingValues) const; + SourceFactorySP createSourceFactory(const TimingValues & timingValues) const override; private: BuilderMapSP _builderMap; }; |