blob: f2c18767d1d037e28fd77458f896333fa7b21506 (
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 Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <cstdint>
namespace document { class Bucket; }
namespace vespa::config::content::internal {
class InternalStorDistributionType;
}
namespace storage::lib { class ClusterStateBundle; }
namespace search::bmcluster {
/*
* Interface class for describing cluster toplogy and how messages are
* routed from feeders into the cluster.
*/
class IBmDistribution {
public:
using DistributionConfigBuilder = vespa::config::content::internal::InternalStorDistributionType;
using DistributionConfig = const DistributionConfigBuilder;
virtual ~IBmDistribution() = default;
virtual uint32_t get_num_nodes() const = 0;
virtual uint32_t get_service_layer_node_idx(const document::Bucket & bucket) const = 0;
virtual uint32_t get_distributor_node_idx(const document::Bucket & bucket) const = 0;
virtual DistributionConfig get_distribution_config() const = 0;
virtual storage::lib::ClusterStateBundle get_cluster_state_bundle() const = 0;
};
};
|