aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/docstore/logdocumentstore.cpp
blob: d18726dbecb92947695cda82bcf2ffa869ab502f (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "logdocumentstore.h"

namespace search {

using vespalib::nbostream;
using common::FileHeaderContext;

bool
LogDocumentStore::Config::operator == (const Config & rhs) const {
    (void) rhs;
    return DocumentStore::Config::operator ==(rhs) && (_logConfig == rhs._logConfig);
}

LogDocumentStore::LogDocumentStore(vespalib::Executor & executor,
                                   const vespalib::string & baseDir,
                                   const Config & config,
                                   const GrowStrategy & growStrategy,
                                   const TuneFileSummary & tuneFileSummary,
                                   const FileHeaderContext &fileHeaderContext,
                                   transactionlog::SyncProxy &tlSyncer,
                                   IBucketizer::SP bucketizer)
    : DocumentStore(config, _backingStore),
      _backingStore(executor, baseDir, config.getLogConfig(), growStrategy,
                    tuneFileSummary, fileHeaderContext, tlSyncer, std::move(bucketizer))
{}

LogDocumentStore::~LogDocumentStore() = default;

void
LogDocumentStore::reconfigure(const Config & config) {
    DocumentStore::reconfigure(config);
    _backingStore.reconfigure(config.getLogConfig());
}

} // namespace search