aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/test/mock_index_manager.h
blob: 134aeabff58a4dfe2926b12f75b2f3c9e799e1f2 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include <vespa/searchcorespi/index/iindexmanager.h>

namespace proton::test {

/**
 * Mock of the IIndexManager interface used for unit testing.
 */
struct MockIndexManager : public searchcorespi::IIndexManager
{
    ~MockIndexManager() override;
    void putDocument(uint32_t, const Document &, SerialNum, OnWriteDoneType) override {}
    void removeDocuments(LidVector, SerialNum) override {}
    void commit(SerialNum, OnWriteDoneType) override {}
    SerialNum getCurrentSerialNum() const override { return 0; }
    SerialNum getFlushedSerialNum() const override { return 0; }
    searchcorespi::IndexSearchable::SP getSearchable() const override {
        return searchcorespi::IndexSearchable::SP();
    }
    search::SearchableStats getSearchableStats() const override {
        return search::SearchableStats();
    }
    searchcorespi::IFlushTarget::List getFlushTargets() override {
        return searchcorespi::IFlushTarget::List();
    }
    void setSchema(const Schema &, SerialNum) override {}
    void heartBeat(SerialNum) override {}
    void compactLidSpace(uint32_t, SerialNum) override {}
    void setMaxFlushed(uint32_t) override { }
};

}