aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/server/maintenance_jobs_injector.h
blob: 980c0cea19ae10481fc97302bc82748cf9992314 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright Yahoo. 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 "maintenancecontroller.h"
#include "i_lid_space_compaction_handler.h"
#include "i_operation_storer.h"
#include "iheartbeathandler.h"
#include <vespa/searchcore/proton/metrics/documentdb_job_trackers.h>

namespace storage::spi {struct BucketExecutor; }
namespace proton {

class AttributeUsageFilter;
class IBucketModifiedHandler;
class IBucketStateChangedNotifier;
class IClusterStateChangedNotifier;
class IDiskMemUsageNotifier;
class IPruneRemovedDocumentsHandler;
struct IAttributeManager;
struct IBucketStateCalculator;
struct IDocumentMoveHandler;
namespace bucketdb { class IBucketCreateNotifier; }

/**
 * Class that injects all concrete maintenance jobs used in document db
 * into a MaintenanceController.
 */
struct MaintenanceJobsInjector
{
    using IAttributeManagerSP = std::shared_ptr<IAttributeManager>;
    static void injectJobs(MaintenanceController &controller,
                           const DocumentDBMaintenanceConfig &config,
                           storage::spi::BucketExecutor & bucketExecutor,
                           IHeartBeatHandler &hbHandler,
                           IOperationStorer &opStorer,
                           bucketdb::IBucketCreateNotifier &bucketCreateNotifier,
                           document::BucketSpace bucketSpace,
                           IPruneRemovedDocumentsHandler &prdHandler,
                           IDocumentMoveHandler &moveHandler,
                           IBucketModifiedHandler &bucketModifiedHandler,
                           IClusterStateChangedNotifier & clusterStateChangedNotifier,
                           IBucketStateChangedNotifier & bucketStateChangedNotifier,
                           const std::shared_ptr<IBucketStateCalculator> &calc,
                           IDiskMemUsageNotifier &diskMemUsageNotifier,
                           DocumentDBJobTrackers &jobTrackers,
                           IAttributeManagerSP readyAttributeManager,
                           IAttributeManagerSP notReadyAttributeManager,
                           AttributeUsageFilter &attributeUsageFilter);
};

} // namespace proton