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

#pragma once

#include "i_document_meta_store.h"
#include <vespa/searchcommon/attribute/i_document_meta_store_context.h>

namespace proton {

/**
 * API for providing write and read interface to the document meta store.
 */
struct IDocumentMetaStoreContext : public search::IDocumentMetaStoreContext {

    using SP = std::shared_ptr<IDocumentMetaStoreContext>;

    virtual ~IDocumentMetaStoreContext() = default;

    /**
     * Access to write interface.
     * Should only be used by the writer thread.
     */
    virtual proton::IDocumentMetaStore &get() = 0;
    virtual proton::IDocumentMetaStore::SP getSP() const = 0;

    /**
     * Construct free lists of underlying meta store.
     */
    virtual void constructFreeList() = 0;
};

} // namespace proton