aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/reprocessing/i_reprocessing_reader.h
blob: 6619fd28be2956f7454e560e93c8d82c459a50be (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/document/fieldvalue/document.h>

namespace proton {

/**
 * Interface for a reprocessor that handles a set of documents
 * to update some other components based on the content of those documents.
 */
struct IReprocessingReader
{
    using SP = std::shared_ptr<IReprocessingReader>;

    virtual ~IReprocessingReader() = default;

    /**
     * Handle the given existing document.
     */
    virtual void handleExisting(uint32_t lid, const std::shared_ptr<document::Document> &doc) = 0;

    // signals that there are no more documents
    virtual void done() {}
};

} // namespace proton