aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/server/heart_beat_job.h
blob: 8b77d3260445a123ece4c195be9cc5c04fca7106 (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include "document_db_maintenance_config.h"
#include "i_maintenance_job.h"
#include "iheartbeathandler.h"

namespace proton {

/**
 * Job that regularly does heart beating on a given handler.
 *
 * The FeedHandler is typically acting as a handler to do
 * heart beating on its underlying components.
 */
class HeartBeatJob : public IMaintenanceJob
{
private:
    IHeartBeatHandler &_handler;

public:
    HeartBeatJob(IHeartBeatHandler &handler,
                 const DocumentDBHeartBeatConfig &config);

    // Implements IMaintenanceJob
    bool run() override;
    void onStop() override { }
};

} // namespace proton