aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/server/document_scan_iterator.h
blob: d4e7053af41f557d1816e6d9da1a5133d85bbe1e (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include "i_document_scan_iterator.h"

namespace proton {

struct IDocumentMetaStore;

/**
 * Iterator for scanning all documents in a document meta store.
 */
class DocumentScanIterator : public IDocumentScanIterator
{
private:
    const IDocumentMetaStore &_metaStore;
    uint32_t                  _lastLid;
    bool                      _itrValid;

public:
    DocumentScanIterator(const IDocumentMetaStore &_metaStore);
    bool valid() const override;
    search::DocumentMetaData next(uint32_t compactLidLimit) override;
};

} // namespace proton