mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 04:12:19 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
31 lines
542 B
C++
31 lines
542 B
C++
|
|
#include <Core/BackgroundSchedulePool.h>
|
|
#include <Common/Stopwatch.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class Context;
|
|
|
|
/// Add a task to BackgroundProcessingPool that resolves all hosts and updates cache with constant period.
|
|
class DNSCacheUpdater
|
|
{
|
|
public:
|
|
explicit DNSCacheUpdater(Context & context, Int32 update_period_seconds_);
|
|
~DNSCacheUpdater();
|
|
void start();
|
|
|
|
private:
|
|
void run();
|
|
|
|
Context & context;
|
|
Int32 update_period_seconds;
|
|
|
|
BackgroundSchedulePool & pool;
|
|
BackgroundSchedulePoolTaskHolder task_handle;
|
|
};
|
|
|
|
|
|
}
|