aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_mapper_factory.cpp
blob: cfeb652d1cc703a0ddaebf6b787d0642a0a26ad8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "gid_to_lid_mapper_factory.h"
#include "gid_to_lid_mapper.h"
#include <vespa/searchcore/proton/documentmetastore/documentmetastore.h>

namespace proton {

GidToLidMapperFactory::GidToLidMapperFactory(std::shared_ptr<const search::IDocumentMetaStoreContext> dmsContext)
    : _dmsContext(std::move(dmsContext))
{
}

GidToLidMapperFactory::~GidToLidMapperFactory() = default;

std::unique_ptr<search::IGidToLidMapper>
GidToLidMapperFactory::getMapper() const
{
    return std::make_unique<GidToLidMapper>(*_dmsContext);
}

} // namespace proton