aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/server/maintenancedocumentsubdb.cpp
blob: 9472d87231ecb50019060aa8e35c511b0a34e20c (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
37
38
39
40
41
42
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "maintenancedocumentsubdb.h"
#include <vespa/searchcore/proton/common/ipendinglidtracker.h>

namespace proton {

MaintenanceDocumentSubDB::MaintenanceDocumentSubDB()
    : _name(""),
      _sub_db_id(0),
      _meta_store(nullptr),
      _retriever(nullptr),
      _feed_view(nullptr)
{
}

MaintenanceDocumentSubDB::~MaintenanceDocumentSubDB() = default;

MaintenanceDocumentSubDB::MaintenanceDocumentSubDB(const vespalib::string& name,
                                                   uint32_t sub_db_id,
                                                   IDocumentMetaStore::SP meta_store,
                                                   IDocumentRetriever::SP retriever,
                                                   IFeedView::SP feed_view)
    : _name(name),
      _sub_db_id(sub_db_id),
      _meta_store(std::move(meta_store)),
      _retriever(std::move(retriever)),
      _feed_view(std::move(feed_view))
{
}

void
MaintenanceDocumentSubDB::clear()
{
    _name = "";
    _sub_db_id = 0;
    _meta_store.reset();
    _retriever.reset();
    _feed_view.reset();
}

}