aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storage/distributor/distributor_component.cpp
blob: 51674fdbf89c1d2cfe04d7c3a10be4deb32dd464 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "distributor_bucket_space.h"
#include "distributor_bucket_space_repo.h"
#include "distributor_component.h"

namespace storage::distributor {

DistributorComponent::DistributorComponent(DistributorInterface& distributor,
                                           DistributorComponentRegister& comp_reg,
                                           const std::string& name)
    : storage::DistributorComponent(comp_reg, name),
      _distributor(distributor),
      _bucket_space_states()
{
}

DistributorComponent::~DistributorComponent() = default;

api::StorageMessageAddress
DistributorComponent::node_address(uint16_t node_index) const noexcept
{
    return api::StorageMessageAddress::create(cluster_name_ptr(), lib::NodeType::STORAGE, node_index);
}

}