aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.h
blob: 05fc6b1fed2a0781426097c94c9f28a9213889e8 (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
35
36
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include "removedocumentsoperation.h"
#include <vespa/searchlib/query/base.h>

namespace proton {

class PruneRemovedDocumentsOperation : public RemoveDocumentsOperation
{
private:
    uint32_t _subDbId;
public:
    using UP = std::unique_ptr<PruneRemovedDocumentsOperation>;

    PruneRemovedDocumentsOperation();
    PruneRemovedDocumentsOperation(search::DocumentIdT docIdLimit, uint32_t subDbId);

    uint32_t getSubDbId() const { return _subDbId; }

    void setLidsToRemove(const LidVectorContext::SP &lidsToRemove) {
        RemoveDocumentsOperation::setLidsToRemove(_subDbId, lidsToRemove);
    }

    const LidVectorContext::SP
    getLidsToRemove() const {
        return RemoveDocumentsOperation::getLidsToRemove(_subDbId);
    }

    void serialize(vespalib::nbostream &os) const override;
    void deserialize(vespalib::nbostream &is, const document::DocumentTypeRepo &repo) override;
    vespalib::string toString() const override;
};

} // namespace proton