blob: fb8ef677204dba5c621fa80c2159a9212eb66a47 (
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "bm_storage_message_addresses.h"
#include <vespa/messagebus/routing/route.h>
namespace search::bmcluster {
/*
* Class containing the message bus routes for a set of nodes at
* the given layer (service layer or distributor).
*/
class BmMessageBusRoutes : public BmStorageMessageAddresses
{
std::vector<mbus::Route> _routes;
public:
BmMessageBusRoutes(uint32_t num_nodes, bool distributor);
~BmMessageBusRoutes();
const mbus::Route& get_route(uint32_t node_idx) const { return _routes[node_idx]; }
bool has_route(uint32_t node_idx) const { return node_idx < _routes.size(); }
};
}
|