aboutsummaryrefslogtreecommitdiffstats
path: root/slobrok/src/vespa/slobrok/server/map_listener.cpp
blob: ef4631a7d511dc4b15e13b9461268d0693535aac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright Vespa.ai. 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