diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-12-01 10:51:20 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-12-01 10:51:20 +0000 |
commit | 76ed35ea52b5ab35ab91a59aeefb7a154052060f (patch) | |
tree | f8126013346e77197593bc1d74af9ccb7751b6bf | |
parent | 26c16eeb3d4d792938ab9af9aff1e01b540a6f42 (diff) |
Misc cleanup of includes and code health
59 files changed, 200 insertions, 199 deletions
diff --git a/config/src/apps/vespa-get-config/getconfig.cpp b/config/src/apps/vespa-get-config/getconfig.cpp index dc12d2bbf0e..a5e400bd354 100644 --- a/config/src/apps/vespa-get-config/getconfig.cpp +++ b/config/src/apps/vespa-get-config/getconfig.cpp @@ -1,13 +1,13 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> #include <vespa/config/config.h> #include <vespa/config/frt/frtconfigrequestfactory.h> #include <vespa/config/frt/frtconnection.h> #include <vespa/config/common/payload_converter.h> #include <vespa/fastos/app.h> - #include <string> #include <sstream> #include <fstream> @@ -28,7 +28,7 @@ private: public: GetConfig() : _server(), _target(nullptr) {} - virtual ~GetConfig(); + ~GetConfig() override; int usage(); void initRPC(const char *spec); void finiRPC(); diff --git a/config/src/apps/vespa-ping-configproxy/pingproxy.cpp b/config/src/apps/vespa-ping-configproxy/pingproxy.cpp index 208f9312ada..a47fd25f9af 100644 --- a/config/src/apps/vespa-ping-configproxy/pingproxy.cpp +++ b/config/src/apps/vespa-ping-configproxy/pingproxy.cpp @@ -1,6 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/fastos/app.h> #include <sstream> @@ -15,12 +17,11 @@ private: std::unique_ptr<fnet::frt::StandaloneFRT> _server; FRT_Target *_target; - PingProxy(const PingProxy &); - PingProxy &operator=(const PingProxy &); - public: + PingProxy(const PingProxy &) = delete; + PingProxy &operator=(const PingProxy &) = delete; PingProxy() : _server(), _target(nullptr) {} - virtual ~PingProxy(); + ~PingProxy() override ; int usage(); void initRPC(const char *spec); void finiRPC(); diff --git a/config/src/tests/failover/failover.cpp b/config/src/tests/failover/failover.cpp index 99b6967c929..2e039081716 100644 --- a/config/src/tests/failover/failover.cpp +++ b/config/src/tests/failover/failover.cpp @@ -5,7 +5,9 @@ #include <vespa/config/frt/protocol.h> #include <vespa/config/config.h> #include <vespa/config/common/configcontext.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/rpcrequest.h> + #include "config-my.h" #include <vespa/vespalib/data/slime/slime.h> #include <vespa/vespalib/data/simple_buffer.h> diff --git a/config/src/tests/file_acquirer/file_acquirer_test.cpp b/config/src/tests/file_acquirer/file_acquirer_test.cpp index 33bb8f47e09..da4bd71b82b 100644 --- a/config/src/tests/file_acquirer/file_acquirer_test.cpp +++ b/config/src/tests/file_acquirer/file_acquirer_test.cpp @@ -1,7 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> #include <vespa/config/file_acquirer/file_acquirer.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/vespalib/util/stringfmt.h> using namespace config; diff --git a/config/src/tests/frt/frt.cpp b/config/src/tests/frt/frt.cpp index 85b9789821d..0d70605fa62 100644 --- a/config/src/tests/frt/frt.cpp +++ b/config/src/tests/frt/frt.cpp @@ -11,9 +11,8 @@ #include <vespa/vespalib/data/slime/slime.h> #include <vespa/vespalib/data/slime/json_format.h> #include <vespa/vespalib/data/simple_buffer.h> -#include <vespa/fnet/fnet.h> -#include <vespa/fnet/frt/frt.h> #include <vespa/fnet/frt/error.h> +#include <vespa/fnet/frt/supervisor.h> #include <vespa/config/frt/protocol.h> #include <lz4.h> #include "config-my.h" diff --git a/config/src/vespa/config/frt/frtconfigresponsev3.cpp b/config/src/vespa/config/frt/frtconfigresponsev3.cpp index 9635b4c811c..80cdf88a79a 100644 --- a/config/src/vespa/config/frt/frtconfigresponsev3.cpp +++ b/config/src/vespa/config/frt/frtconfigresponsev3.cpp @@ -1,7 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "frtconfigresponsev3.h" #include "compressioninfo.h" -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/values.h> #include <vespa/vespalib/data/simple_buffer.h> #include <vespa/log/log.h> diff --git a/config/src/vespa/config/frt/slimeconfigrequest.cpp b/config/src/vespa/config/frt/slimeconfigrequest.cpp index 696789f74c1..8a6706974f6 100644 --- a/config/src/vespa/config/frt/slimeconfigrequest.cpp +++ b/config/src/vespa/config/frt/slimeconfigrequest.cpp @@ -1,12 +1,12 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "slimeconfigrequest.h" #include "connection.h" -#include <vespa/fnet/frt/frt.h> #include <vespa/config/common/configkey.h> #include <vespa/config/common/configstate.h> #include <vespa/config/common/configdefinition.h> #include <vespa/config/common/trace.h> #include <vespa/config/common/vespa_version.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/vespalib/data/simple_buffer.h> diff --git a/config/src/vespa/config/frt/slimeconfigresponse.cpp b/config/src/vespa/config/frt/slimeconfigresponse.cpp index 181ab58b184..155515d2ed6 100644 --- a/config/src/vespa/config/frt/slimeconfigresponse.cpp +++ b/config/src/vespa/config/frt/slimeconfigresponse.cpp @@ -1,7 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "slimeconfigresponse.h" #include <vespa/config/common/misc.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/values.h> #include <vespa/vespalib/stllike/string.h> #include <vespa/log/log.h> LOG_SETUP(".config.frt.slimeconfigresponse"); diff --git a/configd/src/apps/sentinel/cmdq.cpp b/configd/src/apps/sentinel/cmdq.cpp index 8fa3726c7f6..489ae97228f 100644 --- a/configd/src/apps/sentinel/cmdq.cpp +++ b/configd/src/apps/sentinel/cmdq.cpp @@ -1,7 +1,7 @@ // Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "cmdq.h" -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/rpcrequest.h> namespace config::sentinel { diff --git a/configd/src/apps/sentinel/rpchooks.cpp b/configd/src/apps/sentinel/rpchooks.cpp index 99bcd404402..aef58b8a1dc 100644 --- a/configd/src/apps/sentinel/rpchooks.cpp +++ b/configd/src/apps/sentinel/rpchooks.cpp @@ -2,7 +2,8 @@ #include "rpchooks.h" #include "cmdq.h" -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/log/log.h> LOG_SETUP(".rpchooks"); diff --git a/configutil/src/lib/configstatus.cpp b/configutil/src/lib/configstatus.cpp index 254fa94a8ec..e56da67fade 100644 --- a/configutil/src/lib/configstatus.cpp +++ b/configutil/src/lib/configstatus.cpp @@ -2,7 +2,6 @@ #include "configstatus.h" #include "tags.h" -#include <vespa/fnet/frt/frt.h> #include <vespa/vespalib/data/slime/slime.h> #include <vbench/http/http_result_handler.h> #include <vbench/http/server_spec.h> diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/externpolicy.cpp b/documentapi/src/vespa/documentapi/messagebus/policies/externpolicy.cpp index 25112a00b99..312cd2d89cb 100644 --- a/documentapi/src/vespa/documentapi/messagebus/policies/externpolicy.cpp +++ b/documentapi/src/vespa/documentapi/messagebus/policies/externpolicy.cpp @@ -2,10 +2,11 @@ #include "externpolicy.h" #include <boost/tokenizer.hpp> #include <vespa/documentapi/messagebus/documentprotocol.h> -#include <vespa/messagebus/emptyreply.h> #include <vespa/vespalib/util/stringfmt.h> #include <vespa/slobrok/sbmirror.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/transport.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fastos/thread.h> #include <vespa/log/log.h> LOG_SETUP(".externpolicy"); @@ -52,13 +53,13 @@ ExternPolicy::ExternPolicy(const string ¶m) : spec.push_back(*it); } - if (spec.size() == 0) { + if (spec.empty()) { _error = vespalib::make_string("Extern policy needs at least one slobrok: Slobrok list '%s' resolved to no slobroks", lst.c_str()); return; } slobrok::ConfiguratorFactory config(spec); - _mirror.reset(new MirrorAPI(*_orb, config)); + _mirror = std::make_unique<MirrorAPI>(*_orb, config); _started = _transport->Start(_threadPool.get()); if (!_started) { _error = "Failed to start FNET supervisor."; diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/externslobrokpolicy.cpp b/documentapi/src/vespa/documentapi/messagebus/policies/externslobrokpolicy.cpp index 800aa8c4520..9eb28432234 100644 --- a/documentapi/src/vespa/documentapi/messagebus/policies/externslobrokpolicy.cpp +++ b/documentapi/src/vespa/documentapi/messagebus/policies/externslobrokpolicy.cpp @@ -4,10 +4,10 @@ #include <vespa/messagebus/routing/routingcontext.h> #include <vespa/config/common/configcontext.h> #include <vespa/vespalib/text/stringtokenizer.h> -#include <vespa/vespalib/util/time.h> -#include <vespa/fnet/frt/frt.h> #include <vespa/slobrok/sbmirror.h> +#include <vespa/fnet/frt/supervisor.h> #include <vespa/fnet/transport.h> +#include <vespa/fastos/thread.h> #include <thread> using slobrok::api::IMirrorAPI; diff --git a/fnet/src/examples/frt/rpc/echo_client.cpp b/fnet/src/examples/frt/rpc/echo_client.cpp index 06f4ef0ee5b..bb2ef66c6fa 100644 --- a/fnet/src/examples/frt/rpc/echo_client.cpp +++ b/fnet/src/examples/frt/rpc/echo_client.cpp @@ -1,6 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/fastos/app.h> #include <vespa/log/log.h> diff --git a/fnet/src/examples/frt/rpc/rpc_callback_client.cpp b/fnet/src/examples/frt/rpc/rpc_callback_client.cpp index 726a500cc55..c63352d8f24 100644 --- a/fnet/src/examples/frt/rpc/rpc_callback_client.cpp +++ b/fnet/src/examples/frt/rpc/rpc_callback_client.cpp @@ -1,6 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/fastos/app.h> #include <vespa/log/log.h> diff --git a/fnet/src/examples/frt/rpc/rpc_callback_server.cpp b/fnet/src/examples/frt/rpc/rpc_callback_server.cpp index 872894b190d..9832a59abad 100644 --- a/fnet/src/examples/frt/rpc/rpc_callback_server.cpp +++ b/fnet/src/examples/frt/rpc/rpc_callback_server.cpp @@ -1,6 +1,10 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/signalshutdown.h> +#include <vespa/fnet/transport.h> + #include <vespa/fastos/app.h> #include <thread> diff --git a/fnet/src/examples/frt/rpc/rpc_client.cpp b/fnet/src/examples/frt/rpc/rpc_client.cpp index fc1d54d3440..1c634f4b704 100644 --- a/fnet/src/examples/frt/rpc/rpc_client.cpp +++ b/fnet/src/examples/frt/rpc/rpc_client.cpp @@ -1,6 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/fastos/app.h> #include <vespa/log/log.h> diff --git a/fnet/src/examples/frt/rpc/rpc_info.cpp b/fnet/src/examples/frt/rpc/rpc_info.cpp index d90d22d1986..0f8b8422241 100644 --- a/fnet/src/examples/frt/rpc/rpc_info.cpp +++ b/fnet/src/examples/frt/rpc/rpc_info.cpp @@ -1,6 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/fastos/app.h> #include <vespa/log/log.h> diff --git a/fnet/src/examples/frt/rpc/rpc_invoke.cpp b/fnet/src/examples/frt/rpc/rpc_invoke.cpp index fb82622a537..d1f35429352 100644 --- a/fnet/src/examples/frt/rpc/rpc_invoke.cpp +++ b/fnet/src/examples/frt/rpc/rpc_invoke.cpp @@ -1,6 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/fastos/app.h> #include <vespa/vespalib/locale/c.h> diff --git a/fnet/src/examples/frt/rpc/rpc_proxy.cpp b/fnet/src/examples/frt/rpc/rpc_proxy.cpp index a61e2d37197..93076344ce2 100644 --- a/fnet/src/examples/frt/rpc/rpc_proxy.cpp +++ b/fnet/src/examples/frt/rpc/rpc_proxy.cpp @@ -1,6 +1,14 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/invoker.h> +#include <vespa/fnet/channel.h> +#include <vespa/fnet/transport_thread.h> +#include <vespa/fnet/transport.h> +#include <vespa/fnet/signalshutdown.h> + #include <vespa/fastos/app.h> #include <chrono> @@ -15,12 +23,10 @@ struct Session uint32_t id; uint32_t finiCnt; - Session(uint32_t xid) : client(nullptr), server(nullptr), id(xid), finiCnt(0) {} + explicit Session(uint32_t xid) : client(nullptr), server(nullptr), id(xid), finiCnt(0) {} ~Session() { assert(client == nullptr && server == nullptr && finiCnt == 2); } - -private: - Session(const Session &); - Session &operator=(const Session &); + Session(const Session &) = delete; + Session &operator=(const Session &) = delete; }; //----------------------------------------------------------------------------- @@ -34,10 +40,9 @@ private: uint32_t _currID; char _prefixStr[256]; - RPCProxy(const RPCProxy &); - RPCProxy &operator=(const RPCProxy &); - public: + RPCProxy(const RPCProxy &) = delete; + RPCProxy &operator=(const RPCProxy &) = delete; RPCProxy(FRT_Supervisor &supervisor, const char *spec, bool verbose) @@ -69,7 +74,7 @@ private: RPCProxy &_proxy; public: - ReqDone(RPCProxy &proxy) : _proxy(proxy) {} + explicit ReqDone(RPCProxy &proxy) : _proxy(proxy) {} void RequestDone(FRT_RPCRequest *req) override; }; diff --git a/fnet/src/examples/frt/rpc/rpc_server.cpp b/fnet/src/examples/frt/rpc/rpc_server.cpp index aa521080538..4333f182cc0 100644 --- a/fnet/src/examples/frt/rpc/rpc_server.cpp +++ b/fnet/src/examples/frt/rpc/rpc_server.cpp @@ -1,6 +1,9 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/signalshutdown.h> +#include <vespa/fnet/transport.h> #include <vespa/fastos/app.h> #include <vespa/log/log.h> diff --git a/fnet/src/examples/ping/packets.cpp b/fnet/src/examples/ping/packets.cpp index e5e9f645c9a..6aa54838c8b 100644 --- a/fnet/src/examples/ping/packets.cpp +++ b/fnet/src/examples/ping/packets.cpp @@ -1,7 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/fnet.h> #include "packets.h" +#include <vespa/fnet/databuffer.h> uint32_t PingRequest::GetPCODE() diff --git a/fnet/src/examples/ping/pingclient.cpp b/fnet/src/examples/ping/pingclient.cpp index 1d65ef3b69c..6a7bd21e715 100644 --- a/fnet/src/examples/ping/pingclient.cpp +++ b/fnet/src/examples/ping/pingclient.cpp @@ -1,8 +1,12 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/transport.h> +#include <vespa/fnet/simplepacketstreamer.h> +#include <vespa/fnet/channel.h> +#include <vespa/fnet/connection.h> #include <examples/ping/packets.h> #include <vespa/fastos/app.h> +#include <vespa/fastos/thread.h> #include <vespa/log/log.h> LOG_SETUP("pingclient"); diff --git a/fnet/src/examples/ping/pingserver.cpp b/fnet/src/examples/ping/pingserver.cpp index c4543134912..cb0ab02aa0d 100644 --- a/fnet/src/examples/ping/pingserver.cpp +++ b/fnet/src/examples/ping/pingserver.cpp @@ -1,6 +1,11 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/transport.h> +#include <vespa/fnet/signalshutdown.h> +#include <vespa/fnet/simplepacketstreamer.h> +#include <vespa/fnet/channel.h> +#include <vespa/fnet/iserveradapter.h> +#include <vespa/fnet/connector.h> #include <examples/ping/packets.h> #include <vespa/fastos/app.h> diff --git a/fnet/src/examples/proxy/proxy.cpp b/fnet/src/examples/proxy/proxy.cpp index a01a16ead9c..062a0d52627 100644 --- a/fnet/src/examples/proxy/proxy.cpp +++ b/fnet/src/examples/proxy/proxy.cpp @@ -1,6 +1,14 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/transport.h> +#include <vespa/fnet/transport_thread.h> +#include <vespa/fnet/connection.h> +#include <vespa/fnet/signalshutdown.h> +#include <vespa/fnet/packet.h> +#include <vespa/fnet/iserveradapter.h> +#include <vespa/fnet/ipacketstreamer.h> +#include <vespa/fnet/channel.h> +#include <vespa/fnet/connector.h> #include <vespa/fastos/app.h> #include <vespa/log/log.h> @@ -140,7 +148,7 @@ private: public: Proxy() : _transport() {} - ~Proxy() { } + ~Proxy() override { } bool GetPacketInfo(FNET_DataBuffer *src, uint32_t *plen, uint32_t *pcode, uint32_t *chid, bool *) override; FNET_Packet *Decode(FNET_DataBuffer *src, uint32_t plen, uint32_t pcode, FNET_Context) override; void Encode(FNET_Packet *packet, uint32_t chid, FNET_DataBuffer *dst) override; diff --git a/fnet/src/examples/timeout/timeout.cpp b/fnet/src/examples/timeout/timeout.cpp index 23dfbeb9070..9f363ccd864 100644 --- a/fnet/src/examples/timeout/timeout.cpp +++ b/fnet/src/examples/timeout/timeout.cpp @@ -1,7 +1,11 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/transport.h> +#include <vespa/fnet/signalshutdown.h> +#include <vespa/fnet/packetqueue.h> +#include <vespa/fnet/controlpacket.h> #include <vespa/fastos/app.h> +#include <vespa/fastos/thread.h> #include <vespa/vespalib/util/time.h> #include <thread> diff --git a/fnet/src/tests/connect/connect_test.cpp b/fnet/src/tests/connect/connect_test.cpp index 3fe7b5b7614..4d92a4d66fc 100644 --- a/fnet/src/tests/connect/connect_test.cpp +++ b/fnet/src/tests/connect/connect_test.cpp @@ -1,7 +1,12 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/transport.h> +#include <vespa/fnet/transport_thread.h> +#include <vespa/fnet/simplepacketstreamer.h> +#include <vespa/fnet/ipackethandler.h> +#include <vespa/fnet/connection.h> +#include <vespa/fnet/controlpacket.h> #include <vespa/vespalib/net/server_socket.h> #include <vespa/vespalib/net/crypto_engine.h> #include <vespa/vespalib/util/stringfmt.h> @@ -114,7 +119,7 @@ struct TransportFixture : FNET_IPacketHandler, FNET_IConnectionCleanupHandler { conn->SetCleanupHandler(this); return conn; } - ~TransportFixture() { + ~TransportFixture() override { transport.ShutDown(true); pool.Close(); } diff --git a/fnet/src/tests/connection_spread/connection_spread_test.cpp b/fnet/src/tests/connection_spread/connection_spread_test.cpp index 11120ebc3dc..caeb4211ab2 100644 --- a/fnet/src/tests/connection_spread/connection_spread_test.cpp +++ b/fnet/src/tests/connection_spread/connection_spread_test.cpp @@ -1,6 +1,12 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/transport.h> +#include <vespa/fnet/transport_thread.h> +#include <vespa/fnet/iserveradapter.h> +#include <vespa/fnet/ipacketstreamer.h> +#include <vespa/fnet/connector.h> +#include <vespa/fnet/connection.h> +#include <vespa/fastos/thread.h> #include <vespa/vespalib/util/stringfmt.h> #include <thread> #include <chrono> diff --git a/fnet/src/tests/frt/method_pt/method_pt.cpp b/fnet/src/tests/frt/method_pt/method_pt.cpp index 53960d73466..450731fe1aa 100644 --- a/fnet/src/tests/frt/method_pt/method_pt.cpp +++ b/fnet/src/tests/frt/method_pt/method_pt.cpp @@ -1,8 +1,9 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> #include <vespa/vespalib/util/stringfmt.h> -#include <vespa/fnet/frt/frt.h> - +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> class Test; class SimpleHandler; diff --git a/fnet/src/tests/frt/parallel_rpc/parallel_rpc_test.cpp b/fnet/src/tests/frt/parallel_rpc/parallel_rpc_test.cpp index ed4911175a0..ff85b389780 100644 --- a/fnet/src/tests/frt/parallel_rpc/parallel_rpc_test.cpp +++ b/fnet/src/tests/frt/parallel_rpc/parallel_rpc_test.cpp @@ -1,7 +1,10 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/vespalib/util/stringfmt.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/transport.h> +#include <vespa/fastos/thread.h> #include <vespa/vespalib/util/benchmark_timer.h> #include <vespa/vespalib/net/crypto_engine.h> #include <vespa/vespalib/net/tls/tls_crypto_engine.h> @@ -26,7 +29,7 @@ struct Rpc : FRT_Invokable { FRT_Target *connect(uint32_t port) { return orb.GetTarget(port); } - ~Rpc() { + ~Rpc() override { transport.ShutDown(true); thread_pool.Close(); } @@ -34,7 +37,7 @@ struct Rpc : FRT_Invokable { struct Server : Rpc { uint32_t port; - Server(CryptoEngine::SP crypto, size_t num_threads) : Rpc(crypto, num_threads), port(listen()) { + Server(CryptoEngine::SP crypto, size_t num_threads) : Rpc(std::move(crypto), num_threads), port(listen()) { init_rpc(); start(); } @@ -54,7 +57,7 @@ struct Server : Rpc { struct Client : Rpc { uint32_t port; - Client(CryptoEngine::SP crypto, size_t num_threads, const Server &server) : Rpc(crypto, num_threads), port(server.port) { + Client(CryptoEngine::SP crypto, size_t num_threads, const Server &server) : Rpc(std::move(crypto), num_threads), port(server.port) { start(); } FRT_Target *connect() { return Rpc::connect(port); } @@ -62,7 +65,7 @@ struct Client : Rpc { struct Result { std::vector<double> req_per_sec; - Result(size_t num_threads) : req_per_sec(num_threads, 0.0) {} + explicit Result(size_t num_threads) : req_per_sec(num_threads, 0.0) {} double throughput() const { double sum = 0.0; for (double sample: req_per_sec) { diff --git a/fnet/src/tests/frt/parallel_rpc/tls_rpc_bench.cpp b/fnet/src/tests/frt/parallel_rpc/tls_rpc_bench.cpp index cdb2636a8c1..8a954db26e0 100644 --- a/fnet/src/tests/frt/parallel_rpc/tls_rpc_bench.cpp +++ b/fnet/src/tests/frt/parallel_rpc/tls_rpc_bench.cpp @@ -6,7 +6,9 @@ #include <vespa/vespalib/net/tls/tls_crypto_engine.h> #include <vespa/vespalib/test/make_tls_options_for_testing.h> #include <vespa/vespalib/test/time_tracer.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <thread> #include <chrono> diff --git a/fnet/src/tests/frt/rpc/detach_return_invoke.cpp b/fnet/src/tests/frt/rpc/detach_return_invoke.cpp index 95dbe672909..68bd58d2f82 100644 --- a/fnet/src/tests/frt/rpc/detach_return_invoke.cpp +++ b/fnet/src/tests/frt/rpc/detach_return_invoke.cpp @@ -1,6 +1,9 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/frt/invoker.h> #include <vespa/vespalib/util/stringfmt.h> struct Receptor : public FRT_IRequestWait diff --git a/fnet/src/tests/frt/rpc/invoke.cpp b/fnet/src/tests/frt/rpc/invoke.cpp index 410a60fa08a..bd2f6fa9e1d 100644 --- a/fnet/src/tests/frt/rpc/invoke.cpp +++ b/fnet/src/tests/frt/rpc/invoke.cpp @@ -3,7 +3,10 @@ #include <vespa/vespalib/net/socket_spec.h> #include <vespa/vespalib/util/benchmark_timer.h> #include <vespa/vespalib/util/latch.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/frt/invoker.h> #include <mutex> #include <condition_variable> @@ -25,7 +28,7 @@ private: vespalib::Latch<FRT_RPCRequest*> _latch; public: RequestLatch() : _latch() {} - ~RequestLatch() { ASSERT_TRUE(!has_req()); } + ~RequestLatch() override { ASSERT_TRUE(!has_req()); } bool has_req() { return _latch.has_value(); } FRT_RPCRequest *read() { return _latch.read(); } void write(FRT_RPCRequest *req) { _latch.write(req); } @@ -38,8 +41,8 @@ class MyReq { private: FRT_RPCRequest *_req; public: - MyReq(FRT_RPCRequest *req) : _req(req) {} - MyReq(const char *method_name) + explicit MyReq(FRT_RPCRequest *req) : _req(req) {} + explicit MyReq(const char *method_name) : _req(new FRT_RPCRequest()) { _req->SetMethodName(method_name); @@ -270,8 +273,6 @@ public: _testRPC(&_server.supervisor()), _echoTest(&_server.supervisor()) { - _client.supervisor().GetTransport()->SetTCPNoDelay(true); - _server.supervisor().GetTransport()->SetTCPNoDelay(true); ASSERT_TRUE(_server.supervisor().Listen("tcp/0")); _peerSpec = SocketSpec::from_host_port("localhost", _server.supervisor().GetListenPort()).spec(); _target = _client.supervisor().GetTarget(_peerSpec.c_str()); diff --git a/fnet/src/tests/frt/rpc/session.cpp b/fnet/src/tests/frt/rpc/session.cpp index 24cbedb3ff7..b96c881ba27 100644 --- a/fnet/src/tests/frt/rpc/session.cpp +++ b/fnet/src/tests/frt/rpc/session.cpp @@ -1,7 +1,9 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <mutex> //------------------------------------------------------------- diff --git a/fnet/src/tests/frt/rpc/sharedblob.cpp b/fnet/src/tests/frt/rpc/sharedblob.cpp index 1c0503454c7..09297bbf1c3 100644 --- a/fnet/src/tests/frt/rpc/sharedblob.cpp +++ b/fnet/src/tests/frt/rpc/sharedblob.cpp @@ -1,7 +1,9 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vector> constexpr size_t ALLOC_LIMIT=1024; diff --git a/fnet/src/tests/info/info.cpp b/fnet/src/tests/info/info.cpp index 1d26f2b0fa1..3422efe1da6 100644 --- a/fnet/src/tests/info/info.cpp +++ b/fnet/src/tests/info/info.cpp @@ -1,6 +1,10 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/channel.h> +#include <vespa/fnet/info.h> #include <mutex> #include <condition_variable> diff --git a/fnet/src/tests/locking/castspeed.cpp b/fnet/src/tests/locking/castspeed.cpp index dc82073ea57..2f784e625be 100644 --- a/fnet/src/tests/locking/castspeed.cpp +++ b/fnet/src/tests/locking/castspeed.cpp @@ -1,6 +1,5 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> #include <chrono> class B; diff --git a/fnet/src/tests/locking/drainpackets.cpp b/fnet/src/tests/locking/drainpackets.cpp index 9db43a5eb52..2d0ab6e2808 100644 --- a/fnet/src/tests/locking/drainpackets.cpp +++ b/fnet/src/tests/locking/drainpackets.cpp @@ -1,6 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/packetqueue.h> +#include <vespa/fnet/packet.h> #include <mutex> #include <chrono> diff --git a/fnet/src/tests/locking/lockspeed.cpp b/fnet/src/tests/locking/lockspeed.cpp index ae6b983d724..a3ab48edd22 100644 --- a/fnet/src/tests/locking/lockspeed.cpp +++ b/fnet/src/tests/locking/lockspeed.cpp @@ -1,6 +1,5 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> #include "dummy.h" #include <chrono> diff --git a/fnet/src/tests/scheduling/schedule.cpp b/fnet/src/tests/scheduling/schedule.cpp index a1b02a688bf..fc5b5687c87 100644 --- a/fnet/src/tests/scheduling/schedule.cpp +++ b/fnet/src/tests/scheduling/schedule.cpp @@ -1,6 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/scheduler.h> +#include <vespa/fnet/task.h> using my_clock = FNET_Scheduler::clock; using time_point = my_clock::time_point; diff --git a/fnet/src/tests/scheduling/sloweventloop.cpp b/fnet/src/tests/scheduling/sloweventloop.cpp index 5ddc9b1502c..a36afbc9d92 100644 --- a/fnet/src/tests/scheduling/sloweventloop.cpp +++ b/fnet/src/tests/scheduling/sloweventloop.cpp @@ -1,6 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/scheduler.h> +#include <vespa/fnet/task.h> class MyTask : public FNET_Task { diff --git a/fnet/src/tests/thread_selection/thread_selection_test.cpp b/fnet/src/tests/thread_selection/thread_selection_test.cpp index ecfe0c57d5c..35df07221a2 100644 --- a/fnet/src/tests/thread_selection/thread_selection_test.cpp +++ b/fnet/src/tests/thread_selection/thread_selection_test.cpp @@ -1,6 +1,6 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> +#include <vespa/fnet/transport.h> #include <vespa/vespalib/util/stringfmt.h> #include <thread> #include <chrono> diff --git a/fnet/src/tests/time/timespeed.cpp b/fnet/src/tests/time/timespeed.cpp index e6d2af5a278..eda367f1990 100644 --- a/fnet/src/tests/time/timespeed.cpp +++ b/fnet/src/tests/time/timespeed.cpp @@ -1,6 +1,5 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/fnet/fnet.h> #include <vespa/vespalib/util/benchmark_timer.h> #include <chrono> diff --git a/fnet/src/vespa/fnet/fnet.h b/fnet/src/vespa/fnet/fnet.h deleted file mode 100644 index c7570e025ec..00000000000 --- a/fnet/src/vespa/fnet/fnet.h +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -#pragma once - -#include <vespa/vespalib/component/vtag.h> - -// DEPRECATED - -#define DEPRECATED __attribute__((deprecated)) - -// FORWARD DECLARATIONS - -class FNET_IPacketFactory; -class FNET_IPacketHandler; -class FNET_IPacketStreamer; -class FNET_IServerAdapter; -class FNET_IExecutable; - -class FNET_Channel; -class FNET_ChannelLookup; -class FNET_ChannelPool; -class FNET_Config; -class FNET_Connection; -class FNET_Connector; -class FNET_Context; -class FNET_ControlPacket; -class FNET_DataBuffer; -class FNET_DummyPacket; -class FNET_Info; -class FNET_IOComponent; -class FNET_Packet; -class FNET_PacketQueue; -class FNET_Scheduler; -class FNET_SimplePacketStreamer; -class FNET_Task; -class FNET_Transport; -class FNET_TransportThread; - -// CONTEXT CLASS (union of types) -#include "context.h" - -// INTERFACES -#include "ipacketfactory.h" -#include "ipackethandler.h" -#include "ipacketstreamer.h" -#include "iserveradapter.h" -#include "iexecutable.h" - -// CLASSES -#include "task.h" -#include "scheduler.h" -#include "config.h" -#include "databuffer.h" -#include "packet.h" -#include "dummypacket.h" -#include "controlpacket.h" -#include "packetqueue.h" -#include "channel.h" -#include "channellookup.h" -#include "simplepacketstreamer.h" -#include "transport_thread.h" -#include "iocomponent.h" -#include "transport.h" -#include "connection.h" -#include "connector.h" -#include "info.h" -#include "signalshutdown.h" - diff --git a/fnet/src/vespa/fnet/frt/frt.h b/fnet/src/vespa/fnet/frt/frt.h deleted file mode 100644 index 490b9b0a2b1..00000000000 --- a/fnet/src/vespa/fnet/frt/frt.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -#pragma once - -class FRT_Invokable; -class FRT_IAbortHandler; -class FRT_IReturnHandler; -class FRT_ICleanupHandler; -class FRT_ISharedBlob; - -class FRT_Method; -class FRT_PacketFactory; -class FRT_ReflectionBuilder; -class FRT_ReflectionManager; -class FRT_RPCErrorPacket; -class FRT_RPCInvoker; -class FRT_RPCReplyPacket; -class FRT_RPCRequest; -class FRT_RPCRequestPacket; -class FRT_Supervisor; -class FRT_Target; -class FRT_Values; - -#include <vespa/fnet/fnet.h> -#include "error.h" -#include "isharedblob.h" -#include "invokable.h" -#include "values.h" -#include "reflection.h" -#include "rpcrequest.h" -#include "packets.h" -#include "invoker.h" -#include "supervisor.h" -#include "target.h" - diff --git a/fnet/src/vespa/fnet/transport.h b/fnet/src/vespa/fnet/transport.h index 1126f68e69f..4acac4d6c6e 100644 --- a/fnet/src/vespa/fnet/transport.h +++ b/fnet/src/vespa/fnet/transport.h @@ -3,6 +3,7 @@ #pragma once #include "context.h" +#include "config.h" #include <memory> #include <vector> #include <vespa/vespalib/net/async_resolver.h> diff --git a/jrt_test/src/jrt-test/simpleserver/simpleserver.cpp b/jrt_test/src/jrt-test/simpleserver/simpleserver.cpp index ff6c84b5b18..cf23a027905 100644 --- a/jrt_test/src/jrt-test/simpleserver/simpleserver.cpp +++ b/jrt_test/src/jrt-test/simpleserver/simpleserver.cpp @@ -1,6 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/transport.h> #include <vespa/fastos/app.h> class Server : public FRT_Invokable diff --git a/jrt_test/src/tests/echo/echo-client.cpp b/jrt_test/src/tests/echo/echo-client.cpp index 3a87e38e6e0..4bc9ac743e4 100644 --- a/jrt_test/src/tests/echo/echo-client.cpp +++ b/jrt_test/src/tests/echo/echo-client.cpp @@ -1,6 +1,9 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> + #include <vespa/fastos/app.h> class EchoClient : public FastOS_Application diff --git a/jrt_test/src/tests/mandatory-methods/extract-reflection.cpp b/jrt_test/src/tests/mandatory-methods/extract-reflection.cpp index cd1ad7e6eed..af9f60f84d3 100644 --- a/jrt_test/src/tests/mandatory-methods/extract-reflection.cpp +++ b/jrt_test/src/tests/mandatory-methods/extract-reflection.cpp @@ -1,7 +1,9 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/fastos/app.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/vespalib/util/time.h> #include <thread> diff --git a/jrt_test/src/tests/mockup-invoke/mockup-server.cpp b/jrt_test/src/tests/mockup-invoke/mockup-server.cpp index 4101bb8e9aa..1abe27407b3 100644 --- a/jrt_test/src/tests/mockup-invoke/mockup-server.cpp +++ b/jrt_test/src/tests/mockup-invoke/mockup-server.cpp @@ -1,15 +1,15 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/transport.h> #include <vespa/fastos/app.h> class MockupServer : public FRT_Invokable { -private: - MockupServer(const MockupServer &); - MockupServer &operator=(const MockupServer &); - public: + MockupServer(const MockupServer &) = delete; + MockupServer &operator=(const MockupServer &) = delete; MockupServer(FRT_Supervisor *s) { FRT_ReflectionBuilder rb(s); diff --git a/jrt_test/src/tests/rpc-error/test-errors.cpp b/jrt_test/src/tests/rpc-error/test-errors.cpp index c30af8ea579..1c0c057e433 100644 --- a/jrt_test/src/tests/rpc-error/test-errors.cpp +++ b/jrt_test/src/tests/rpc-error/test-errors.cpp @@ -1,6 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/testapp.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> class TestErrors : public vespalib::TestApp { diff --git a/logd/src/logd/rpc_forwarder.cpp b/logd/src/logd/rpc_forwarder.cpp index ffc43bce0bb..90adf7c0b66 100644 --- a/logd/src/logd/rpc_forwarder.cpp +++ b/logd/src/logd/rpc_forwarder.cpp @@ -7,6 +7,10 @@ #include <vespa/log/exceptions.h> #include <vespa/vespalib/util/buffer.h> #include <vespa/vespalib/util/stringfmt.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/frt/supervisor.h> + + #include <vespa/log/log.h> LOG_SETUP(".logd.rpc_forwarder"); diff --git a/logd/src/logd/rpc_forwarder.h b/logd/src/logd/rpc_forwarder.h index 37729db088f..fbc3ecbc09a 100644 --- a/logd/src/logd/rpc_forwarder.h +++ b/logd/src/logd/rpc_forwarder.h @@ -5,10 +5,12 @@ #include "forwarder.h" #include "proto_converter.h" #include <vespa/log/log_message.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/target.h> #include <memory> #include <vector> +class FRT_Supervisor; + namespace logdemon { struct Metrics; diff --git a/logd/src/tests/rpc_forwarder/rpc_forwarder_test.cpp b/logd/src/tests/rpc_forwarder/rpc_forwarder_test.cpp index d39a9ade0a8..370ca7f458e 100644 --- a/logd/src/tests/rpc_forwarder/rpc_forwarder_test.cpp +++ b/logd/src/tests/rpc_forwarder/rpc_forwarder_test.cpp @@ -5,6 +5,10 @@ #include <logd/rpc_forwarder.h> #include <vespa/vespalib/gtest/gtest.h> #include <vespa/vespalib/metrics/dummy_metrics_manager.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/rpcrequest.h> + + using namespace logdemon; using vespalib::metrics::DummyMetricsManager; diff --git a/searchcore/src/apps/vespa-proton-cmd/vespa-proton-cmd.cpp b/searchcore/src/apps/vespa-proton-cmd/vespa-proton-cmd.cpp index 8c7e6f13c18..8b6203c78a2 100644 --- a/searchcore/src/apps/vespa-proton-cmd/vespa-proton-cmd.cpp +++ b/searchcore/src/apps/vespa-proton-cmd/vespa-proton-cmd.cpp @@ -3,7 +3,8 @@ #include <vespa/slobrok/sbmirror.h> #include <vespa/config/common/configsystem.h> #include <vespa/config/common/exceptions.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> #include <vespa/vespalib/util/host_name.h> #include <vespa/vespalib/util/stringfmt.h> #include <vespa/vespalib/util/time.h> @@ -28,10 +29,12 @@ private: FRT_RPCRequest *_req; public: - App() : _frt(), - _target(nullptr), - _req(nullptr) {} - virtual ~App() + App() + : _frt(), + _target(nullptr), + _req(nullptr) + {} + ~App() override { assert(!_frt); assert(_target == nullptr); diff --git a/searchlib/src/tests/engine/proto_rpc_adapter/proto_rpc_adapter_test.cpp b/searchlib/src/tests/engine/proto_rpc_adapter/proto_rpc_adapter_test.cpp index 3dbe0d00881..1cd91329912 100644 --- a/searchlib/src/tests/engine/proto_rpc_adapter/proto_rpc_adapter_test.cpp +++ b/searchlib/src/tests/engine/proto_rpc_adapter/proto_rpc_adapter_test.cpp @@ -6,7 +6,9 @@ #include <vespa/searchlib/engine/searchapi.h> #include <vespa/searchlib/engine/docsumapi.h> #include <vespa/searchlib/engine/monitorapi.h> -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/vespalib/data/slime/slime.h> #include <vespa/vespalib/data/slime/binary_format.h> #include <thread> @@ -83,7 +85,7 @@ struct ProtoRpcAdapterTest : ::testing::Test { FRT_Target *connect() { return server.supervisor().GetTarget(server.supervisor().GetListenPort()); } - ~ProtoRpcAdapterTest() = default; + ~ProtoRpcAdapterTest() override = default; }; //----------------------------------------------------------------------------- diff --git a/slobrok/src/apps/slobrok/slobrok.cpp b/slobrok/src/apps/slobrok/slobrok.cpp index b89449e6779..5d650fafc96 100644 --- a/slobrok/src/apps/slobrok/slobrok.cpp +++ b/slobrok/src/apps/slobrok/slobrok.cpp @@ -1,5 +1,4 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/fnet.h> #include <vespa/slobrok/server/sbenv.h> #include <vespa/config/common/exceptions.h> #include <vespa/vespalib/util/exceptions.h> diff --git a/storage/src/vespa/storage/tools/storage-cmd.cpp b/storage/src/vespa/storage/tools/storage-cmd.cpp index 8c0fcc83330..00ee2c9c4cf 100644 --- a/storage/src/vespa/storage/tools/storage-cmd.cpp +++ b/storage/src/vespa/storage/tools/storage-cmd.cpp @@ -1,5 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fnet/frt/frt.h> +#include <vespa/fnet/frt/rpcrequest.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> #include <vespa/slobrok/sbmirror.h> #include <vespa/fastos/app.h> #include <vespa/vespalib/locale/c.h> diff --git a/vespaclient/src/vespa/vespaclient/vdsstates/statesapp.cpp b/vespaclient/src/vespa/vespaclient/vdsstates/statesapp.cpp index 9393562bf28..a468dd98698 100644 --- a/vespaclient/src/vespa/vespaclient/vdsstates/statesapp.cpp +++ b/vespaclient/src/vespa/vespaclient/vdsstates/statesapp.cpp @@ -1,8 +1,10 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/defaults.h> -#include <vespa/fnet/frt/frt.h> #include <vespa/slobrok/sbmirror.h> +#include <vespa/fnet/frt/supervisor.h> +#include <vespa/fnet/frt/target.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/vdslib/distribution/distribution.h> #include <vespa/vdslib/state/clusterstate.h> #include <vespa/vespalib/util/programoptions.h> |