summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-02-24 20:31:12 +0100
committerGitHub <noreply@github.com>2022-02-24 20:31:12 +0100
commitcceca8e48b0c98a0faa93eee742f43a974d0afc3 (patch)
tree0c1411256709620c9dc4952dfa482384a07d3fc9 /config
parent76d074a593d2fc98a4a459ed1665b2849121f12e (diff)
Revert "- Create the common transport and threadpool in the main loop."
Diffstat (limited to 'config')
-rw-r--r--config/src/vespa/config/subscription/sourcespec.cpp16
-rw-r--r--config/src/vespa/config/subscription/sourcespec.h31
2 files changed, 11 insertions, 36 deletions
diff --git a/config/src/vespa/config/subscription/sourcespec.cpp b/config/src/vespa/config/subscription/sourcespec.cpp
index 15f45434056..ec70f921179 100644
--- a/config/src/vespa/config/subscription/sourcespec.cpp
+++ b/config/src/vespa/config/subscription/sourcespec.cpp
@@ -131,22 +131,6 @@ ServerSpec::createSourceFactory(const TimingValues & timingValues) const
timingValues, _traceLevel, vespaVersion, _compressionType);
}
-ConfigServerSpec::ConfigServerSpec(FNET_Transport & transport)
- : ServerSpec(),
- _transport(transport)
-{
-}
-
-ConfigServerSpec::~ConfigServerSpec() = default;
-
-std::unique_ptr<SourceFactory>
-ConfigServerSpec::createSourceFactory(const TimingValues & timingValues) const
-{
- const auto vespaVersion = VespaVersion::getCurrentVersion();
- return std::make_unique<FRTSourceFactory>(
- std::make_unique<FRTConnectionPool>(_transport, *this, timingValues),
- timingValues, traceLevel(), vespaVersion, compressionType());
-}
ConfigSet::ConfigSet()
: _builderMap(std::make_unique<BuilderMap>())
diff --git a/config/src/vespa/config/subscription/sourcespec.h b/config/src/vespa/config/subscription/sourcespec.h
index e2bdd1c61ee..3c23233e3ab 100644
--- a/config/src/vespa/config/subscription/sourcespec.h
+++ b/config/src/vespa/config/subscription/sourcespec.h
@@ -7,8 +7,6 @@
#include <vector>
#include <memory>
-class FNET_Transport;
-
namespace config {
class ConfigInstance;
@@ -24,6 +22,7 @@ typedef vespalib::string SourceSpecKey;
class SourceSpec
{
public:
+ using SourceFactorySP = std::unique_ptr<SourceFactory>;
using UP = std::unique_ptr<SourceSpec>; /// Convenience typedef
/**
@@ -37,7 +36,7 @@ public:
* @param timingValues Timing values to be used for this source.
* @return An std::unique_ptr<Source> that can be used to ask for config.
*/
- virtual std::unique_ptr<SourceFactory> createSourceFactory(const TimingValues & timingValues) const = 0;
+ virtual SourceFactorySP createSourceFactory(const TimingValues & timingValues) const = 0;
virtual ~SourceSpec() = default;
};
@@ -55,7 +54,8 @@ public:
*/
RawSpec(const vespalib::string & config);
- std::unique_ptr<SourceFactory> createSourceFactory(const TimingValues & timingValues) const override;
+ // Implements SourceSpec
+ SourceFactorySP createSourceFactory(const TimingValues & timingValues) const override;
/**
* Returns the string representation of this config.
@@ -89,7 +89,8 @@ public:
*/
const vespalib::string & getFileName() const { return _fileName; }
- std::unique_ptr<SourceFactory> createSourceFactory(const TimingValues & timingValues) const override;
+ // Implements SourceSpec
+ SourceFactorySP createSourceFactory(const TimingValues & timingValues) const override;
private:
void verifyName(const vespalib::string & fileName);
vespalib::string _fileName;
@@ -116,7 +117,8 @@ public:
*/
const vespalib::string & getDirName() const { return _dirName; }
- std::unique_ptr<SourceFactory> createSourceFactory(const TimingValues & timingValues) const override;
+ // Implements SourceSpec
+ SourceFactorySP createSourceFactory(const TimingValues & timingValues) const override;
private:
vespalib::string _dirName;
};
@@ -152,7 +154,7 @@ public:
*/
ServerSpec(const vespalib::string & hostSpec);
- std::unique_ptr<SourceFactory> createSourceFactory(const TimingValues & timingValues) const override;
+ SourceFactorySP createSourceFactory(const TimingValues & timingValues) const override;
/**
* Inspect how many hosts this source refers to.
@@ -191,18 +193,6 @@ private:
const static int DEFAULT_PROXY_PORT = 19090;
};
-/**
- * A ServerSpec that allows providing externally supplied transport
- */
-class ConfigServerSpec : public config::ServerSpec {
-public:
- ConfigServerSpec(FNET_Transport & transport);
- ~ConfigServerSpec() override;
- std::unique_ptr<SourceFactory> createSourceFactory(const TimingValues & timingValues) const override;
-private:
- FNET_Transport & _transport;
-};
-
/**
@@ -231,7 +221,8 @@ public:
*/
void addBuilder(const vespalib::string & configId, ConfigInstance * builder);
- std::unique_ptr<SourceFactory> createSourceFactory(const TimingValues & timingValues) const override;
+ // Implements SourceSpec
+ SourceFactorySP createSourceFactory(const TimingValues & timingValues) const override;
private:
BuilderMapSP _builderMap;
};