aboutsummaryrefslogtreecommitdiffstats
path: root/documentapi/src/vespa/documentapi/messagebus/policies/mirror_with_all.cpp
blob: 8404f8f15d349c7e73d6c62e6d08f0ce5adc3247 (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "mirror_with_all.h"

#include <vespa/slobrok/sbmirror.h>
#include <vespa/fnet/frt/supervisor.h>
#include <vespa/fnet/transport.h>

namespace documentapi {

MirrorAndStuff::MirrorAndStuff(const slobrok::ConfiguratorFactory & config)
  : _transport(std::make_unique<FNET_Transport>()),
    _orb(std::make_unique<FRT_Supervisor>(_transport.get())),
    _mirror(std::make_unique<slobrok::api::MirrorAPI>(*_orb, config))
{
    _transport->Start();
}

MirrorAndStuff::~MirrorAndStuff() {
    _transport->ShutDown(true);
}

}