diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-01 15:32:15 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-01 18:03:25 +0200 |
commit | 61a4ea34c2ddd3b618249b6f6eb402069e40bccb (patch) | |
tree | 6d6e8d55bfd574a0d2d039a07099774d2545f32e /searchcore | |
parent | 54581b5ecd98230dc90fe787f1f02a33ebffbff6 (diff) |
Removed frt.h from header files to reduce include volume.
Diffstat (limited to 'searchcore')
6 files changed, 24 insertions, 25 deletions
diff --git a/searchcore/src/tests/proton/summaryengine/summaryengine.cpp b/searchcore/src/tests/proton/summaryengine/summaryengine.cpp index be32bb3fb18..80b78d420ec 100644 --- a/searchcore/src/tests/proton/summaryengine/summaryengine.cpp +++ b/searchcore/src/tests/proton/summaryengine/summaryengine.cpp @@ -10,6 +10,7 @@ #include <vespa/vespalib/data/databuffer.h> #include <vespa/document/util/compressor.h> #include <vespa/searchlib/common/transport.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/log/log.h> LOG_SETUP("summaryengine_test"); diff --git a/searchcore/src/vespa/searchcore/proton/server/ooscli.cpp b/searchcore/src/vespa/searchcore/proton/server/ooscli.cpp index 7e382ca5087..bdf2dd486ad 100644 --- a/searchcore/src/vespa/searchcore/proton/server/ooscli.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/ooscli.cpp @@ -4,6 +4,7 @@ #include "proton.h" #include <vespa/slobrok/sbmirror.h> #include <vespa/messagebus/network/oosmanager.h> +#include <vespa/fnet/frt/supervisor.h> #include <vespa/log/log.h> LOG_SETUP(".proton.server.ooscli"); @@ -49,5 +50,4 @@ OosCli::PerformTask() Schedule(1.0); } - } // namespace proton diff --git a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp index 48644a29c04..1d255c388d9 100644 --- a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp @@ -2,10 +2,8 @@ #include "rpc_hooks.h" #include "proton.h" -#include <vespa/messagebus/emptyreply.h> -#include <vespa/vespalib/util/stringfmt.h> #include <vespa/vespalib/util/closuretask.h> -#include <vespa/searchcore/proton/common/statusreport.h> +#include <vespa/fnet/frt/supervisor.h> #include <vespa/log/log.h> LOG_SETUP(".proton.server.rtchooks"); @@ -120,12 +118,12 @@ RPCHooksBase::Session::Session() void RPCHooksBase::initRPC() { - _orb.SetSessionInitHook(FRT_METHOD(RPCHooksBase::initSession), this); - _orb.SetSessionFiniHook(FRT_METHOD(RPCHooksBase::finiSession), this); - _orb.SetSessionDownHook(FRT_METHOD(RPCHooksBase::downSession), this); - _orb.SetMethodMismatchHook(FRT_METHOD(RPCHooksBase::mismatch), this); + _orb->SetSessionInitHook(FRT_METHOD(RPCHooksBase::initSession), this); + _orb->SetSessionFiniHook(FRT_METHOD(RPCHooksBase::finiSession), this); + _orb->SetSessionDownHook(FRT_METHOD(RPCHooksBase::downSession), this); + _orb->SetMethodMismatchHook(FRT_METHOD(RPCHooksBase::mismatch), this); - FRT_ReflectionBuilder rb(&_orb); + FRT_ReflectionBuilder rb(_orb.get()); //------------------------------------------------------------------------- rb.DefineMethod("proton.enableSearching", "", "", true, FRT_METHOD(RPCHooksBase::rpc_enableSearching), this); @@ -194,10 +192,10 @@ RPCHooksBase::initRPC() RPCHooksBase::RPCHooksBase(Params ¶ms) : _proton(params.proton), _docsumByRPC(new DocsumByRPC(_proton.getDocsumBySlime())), - _orb(), - _regAPI(_orb, params.slobrok_config), + _orb(std::make_unique<FRT_Supervisor>()), + _regAPI(*_orb, params.slobrok_config), _executor(48, 128 * 1024), - _ooscli(params, _orb) + _ooscli(params, *_orb) { } @@ -206,8 +204,8 @@ RPCHooksBase::open(Params & params) { initRPC(); _regAPI.registerName((params.identity + "/realtimecontroller").c_str()); - _orb.Listen(params.rtcPort); - _orb.Start(); + _orb->Listen(params.rtcPort); + _orb->Start(); LOG(debug, "started monitoring interface"); } @@ -219,7 +217,7 @@ void RPCHooksBase::close() { LOG(info, "shutting down monitoring interface"); - _orb.ShutDown(true); + _orb->ShutDown(true); _executor.shutdown(); { MonitorGuard guard(_stateMonitor); diff --git a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h index 0af5eeaed77..26c7885cadf 100644 --- a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h +++ b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h @@ -2,7 +2,6 @@ #pragma once -#include <vespa/fnet/frt/frt.h> #include <vespa/slobrok/sbregister.h> #include <vespa/vespalib/util/atomic.h> #include <vespa/vespalib/util/executor.h> @@ -61,13 +60,13 @@ private: fastos::TimeStamp _dueTime; }; - Proton & _proton; - std::unique_ptr<DocsumByRPC> _docsumByRPC; - FRT_Supervisor _orb; - slobrok::api::RegisterAPI _regAPI; - vespalib::Monitor _stateMonitor; - vespalib::ThreadStackExecutor _executor; - OosCli _ooscli; + Proton & _proton; + std::unique_ptr<DocsumByRPC> _docsumByRPC; + std::unique_ptr<FRT_Supervisor> _orb; + slobrok::api::RegisterAPI _regAPI; + vespalib::Monitor _stateMonitor; + vespalib::ThreadStackExecutor _executor; + OosCli _ooscli; void initRPC(); void letProtonDo(vespalib::Closure::UP closure); diff --git a/searchcore/src/vespa/searchcore/proton/summaryengine/docsum_by_slime.cpp b/searchcore/src/vespa/searchcore/proton/summaryengine/docsum_by_slime.cpp index 06abf5e65bc..99b39f68006 100644 --- a/searchcore/src/vespa/searchcore/proton/summaryengine/docsum_by_slime.cpp +++ b/searchcore/src/vespa/searchcore/proton/summaryengine/docsum_by_slime.cpp @@ -3,6 +3,7 @@ #include <vespa/document/util/compressor.h> #include <vespa/searchlib/util/slime_output_raw_buf_adapter.h> #include <vespa/searchlib/common/packets.h> +#include <vespa/fnet/frt/rpcrequest.h> #include <vespa/log/log.h> diff --git a/searchcore/src/vespa/searchcore/proton/summaryengine/docsum_by_slime.h b/searchcore/src/vespa/searchcore/proton/summaryengine/docsum_by_slime.h index 920facf76a2..d811a8924aa 100644 --- a/searchcore/src/vespa/searchcore/proton/summaryengine/docsum_by_slime.h +++ b/searchcore/src/vespa/searchcore/proton/summaryengine/docsum_by_slime.h @@ -3,7 +3,8 @@ #include <vespa/searchlib/engine/docsumapi.h> #include <vespa/vespalib/data/slime/slime.h> -#include <vespa/fnet/frt/frt.h> + +class FRT_RPCRequest; namespace proton { @@ -31,4 +32,3 @@ private: }; } - |