blob: a89c8e455a320e9e9fe360d9a92f96b3e91ca2e0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "genericconfigsubscriber.h"
namespace config {
GenericConfigSubscriber::GenericConfigSubscriber(std::shared_ptr<IConfigContext> context)
: _set(std::move(context))
{ }
bool
GenericConfigSubscriber::nextGeneration(vespalib::duration timeout)
{
return _set.acquireSnapshot(timeout, true);
}
std::shared_ptr<ConfigSubscription>
GenericConfigSubscriber::subscribe(const ConfigKey & key, vespalib::duration timeout)
{
return _set.subscribe(key, timeout);
}
void
GenericConfigSubscriber::close()
{
_set.close();
}
int64_t
GenericConfigSubscriber::getGeneration() const
{
return _set.getGeneration();
}
}
|