summaryrefslogtreecommitdiffstats
path: root/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp
blob: 30b71560287055ef5bae52ff640971d862727ee3 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "servicelayerprocess.h"
#include <vespa/storage/storageserver/servicelayernode.h>
#include <vespa/searchvisitor/searchvisitor.h>

namespace storage {

ServiceLayerProcess::ServiceLayerProcess(const config::ConfigUri & configUri)
    : Process(configUri)
{
}

ServiceLayerProcess::~ServiceLayerProcess() {}

void
ServiceLayerProcess::shutdown()
{
    Process::shutdown();
    _node.reset(0);
}

void
ServiceLayerProcess::createNode()
{
    _externalVisitors["searchvisitor"].reset(new SearchVisitorFactory(_configUri));
    setupProvider();
    _node.reset(new ServiceLayerNode(_configUri, _context, *this, getProvider(), _externalVisitors));
    _node->init();
}

StorageNode&
ServiceLayerProcess::getNode() {
    return *_node;
}

StorageNodeContext&
ServiceLayerProcess::getContext() {
    return _context;
}

std::string
ServiceLayerProcess::getComponentName() const {
    return "servicelayer";
}

} // storage