summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-10-03 18:42:12 +0200
committerHenning Baldersheim <balder@oath.com>2018-10-04 18:29:01 +0200
commit3b2a13fad71c26246e0bcda06c04d35064546f40 (patch)
treed2cabb4cbfe23cc98b1a82c8b2b17e28b6975050 /config
parent6ac8dc95fc0af218f8e2468fb83655ff27576be1 (diff)
Remove unused code for generation callback
Diffstat (limited to 'config')
-rw-r--r--config/src/vespa/config/helper/configfetcher.cpp5
-rw-r--r--config/src/vespa/config/helper/configfetcher.h2
-rw-r--r--config/src/vespa/config/helper/configpoller.cpp8
-rw-r--r--config/src/vespa/config/helper/configpoller.h2
-rw-r--r--config/src/vespa/config/helper/configpoller.hpp1
5 files changed, 2 insertions, 16 deletions
diff --git a/config/src/vespa/config/helper/configfetcher.cpp b/config/src/vespa/config/helper/configfetcher.cpp
index 041022755b4..b013c137c2c 100644
--- a/config/src/vespa/config/helper/configfetcher.cpp
+++ b/config/src/vespa/config/helper/configfetcher.cpp
@@ -25,11 +25,6 @@ ConfigFetcher::ConfigFetcher(const SourceSpec & spec)
}
void
-ConfigFetcher::subscribeGenerationChanges(IGenerationCallback * callback) {
- _poller.subscribeGenerationChanges(callback);
-}
-
-void
ConfigFetcher::start()
{
if (!_closed) {
diff --git a/config/src/vespa/config/helper/configfetcher.h b/config/src/vespa/config/helper/configfetcher.h
index 72fc9fa2663..8f318ea511c 100644
--- a/config/src/vespa/config/helper/configfetcher.h
+++ b/config/src/vespa/config/helper/configfetcher.h
@@ -22,8 +22,6 @@ public:
template <typename ConfigType>
void subscribe(const std::string & configId, IFetcherCallback<ConfigType> * callback, uint64_t subscribeTimeout = DEFAULT_SUBSCRIBE_TIMEOUT);
- void subscribeGenerationChanges(IGenerationCallback * callback);
-
void start();
void close();
int64_t getGeneration() const { return _poller.getGeneration(); }
diff --git a/config/src/vespa/config/helper/configpoller.cpp b/config/src/vespa/config/helper/configpoller.cpp
index 65c505e81d8..7953587f858 100644
--- a/config/src/vespa/config/helper/configpoller.cpp
+++ b/config/src/vespa/config/helper/configpoller.cpp
@@ -12,12 +12,11 @@ ConfigPoller::ConfigPoller(const IConfigContext::SP & context)
: _generation(-1),
_subscriber(context),
_handleList(),
- _callbackList(),
- _genCallback(0)
+ _callbackList()
{
}
-ConfigPoller::~ConfigPoller() { }
+ConfigPoller::~ConfigPoller() = default;
void
ConfigPoller::run()
@@ -46,9 +45,6 @@ ConfigPoller::poll()
if (_handleList[i]->isChanged())
callback->configure(std::move(_handleList[i]->getConfig()));
}
- if (_genCallback) {
- _genCallback->notifyGenerationChange(_generation);
- }
} else {
LOG(debug, "No new config available");
}
diff --git a/config/src/vespa/config/helper/configpoller.h b/config/src/vespa/config/helper/configpoller.h
index 2ad719bf298..88e589fd16a 100644
--- a/config/src/vespa/config/helper/configpoller.h
+++ b/config/src/vespa/config/helper/configpoller.h
@@ -20,7 +20,6 @@ public:
void run() override;
template <typename ConfigType>
void subscribe(const std::string & configId, IFetcherCallback<ConfigType> * callback, uint64_t subscribeTimeout = DEFAULT_SUBSCRIBE_TIMEOUT);
- void subscribeGenerationChanges(IGenerationCallback * callback) { _genCallback = callback; }
void poll();
void close();
int64_t getGeneration() const { return _generation; }
@@ -29,7 +28,6 @@ private:
ConfigSubscriber _subscriber;
std::vector<IHandle::UP> _handleList;
std::vector<ICallback *> _callbackList;
- IGenerationCallback *_genCallback;
};
} // namespace config
diff --git a/config/src/vespa/config/helper/configpoller.hpp b/config/src/vespa/config/helper/configpoller.hpp
index f093776bebe..c6fad9e2e97 100644
--- a/config/src/vespa/config/helper/configpoller.hpp
+++ b/config/src/vespa/config/helper/configpoller.hpp
@@ -6,7 +6,6 @@ template <typename ConfigType>
void
ConfigPoller::subscribe(const std::string & configId, IFetcherCallback<ConfigType> * callback, uint64_t subscribeTimeout)
{
-
std::unique_ptr<ConfigHandle<ConfigType> > handle(_subscriber.subscribe<ConfigType>(configId, subscribeTimeout));
_handleList.emplace_back(std::make_unique<GenericHandle<ConfigType>>(std::move(handle)));
_callbackList.push_back(callback);