aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/common/dummydbowner.h
blob: 8e3748b5072a244d744bce14e9981bfcfbf3468b (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 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/searchcore/proton/server/idocumentdbowner.h>
#include <vespa/searchcorespi/plugin/iindexmanagerfactory.h>
#include <vespa/vespalib/stllike/string.h>

namespace proton
{

struct DummyDBOwner : IDocumentDBOwner {
    bool isInitializing() const override { return false; }

    searchcorespi::IIndexManagerFactory::SP
    getIndexManagerFactory(const vespalib::stringref & ) const override {
        return searchcorespi::IIndexManagerFactory::SP();
    }
    uint32_t getDistributionKey() const override { return -1; }
};

} // namespace proton