aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/reference/i_document_db_reference_resolver.h
blob: 5ac170cd6f3ba5dbd247cf5408f934b5048723a0 (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include <vespa/vespalib/util/time.h>
#include <memory>

namespace search { class IAttributeManager; struct IDocumentMetaStoreContext; }

namespace proton {

class ImportedAttributesRepo;

/**
 * Interface used by a given document db to resolve all references to parent document dbs.
 */
struct IDocumentDBReferenceResolver {
    virtual ~IDocumentDBReferenceResolver() {}
    virtual std::unique_ptr<ImportedAttributesRepo> resolve(const search::IAttributeManager &newAttrMgr,
                                                            const search::IAttributeManager &oldAttrMgr,
                                                            const std::shared_ptr<search::IDocumentMetaStoreContext> &documentMetaStore,
                                                            vespalib::duration visibilityDelay) = 0;
    virtual void teardown(const search::IAttributeManager &oldAttrMgr) = 0;
};

}