aboutsummaryrefslogtreecommitdiffstats
path: root/slobrok/src/vespa/slobrok/server/map_listener.cpp
blob: 1ffad05c9eb192d7ef2cf2f818957b8d9d17d623 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "map_listener.h"
#include <vespa/log/log.h>

LOG_SETUP(".slobrok.server.map_listener");

namespace slobrok {

MapListener::~MapListener() = default;

void MapListener::update(const ServiceMapping &old_mapping,
                         const ServiceMapping &new_mapping)
{
    LOG_ASSERT(old_mapping.name == new_mapping.name);
    remove(old_mapping);
    add(new_mapping);
}

} // namespace slobrok