aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storage/distributor/distributor_operation_context.h
blob: c13782212138be38568f54206d5fe6287507537d (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include "storage_node_up_states.h"
#include <vespa/storageapi/defs.h>

namespace storage { class DistributorConfiguration; }

namespace storage::distributor {

class BucketSpaceStateMap;
class DistributorBucketSpaceRepo;

/**
 * Interface with functionality that is used when handling top-level distributor operations.
 */
class DistributorOperationContext {
public:
    virtual ~DistributorOperationContext() = default;
    virtual api::Timestamp generate_unique_timestamp() = 0;
    virtual const BucketSpaceStateMap& bucket_space_states() const noexcept = 0;
    virtual BucketSpaceStateMap& bucket_space_states() noexcept = 0;
    virtual const DistributorConfiguration& distributor_config() const noexcept = 0;
};

}