aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/test/dummy_flush_handler.h
blob: f35d202dcbadc702f2017d30655d8da5def3ee06 (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/searchcore/proton/flushengine/iflushhandler.h>

namespace proton::test {

/**
 * Default implementation used for testing.
 */
struct DummyFlushHandler : public IFlushHandler
{
    DummyFlushHandler(const vespalib::string &name) noexcept
        : IFlushHandler(name)
    {}

    std::vector<IFlushTarget::SP> getFlushTargets() override {
        return std::vector<IFlushTarget::SP>();
    }

    SerialNum getCurrentSerialNumber() const override {
        return 0;
    }

    void flushDone(SerialNum oldestSerial) override {
        (void) oldestSerial;
    }

    void syncTls(SerialNum syncTo) override {
        (void) syncTo;
    }
};

}