aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcorespi/index/warmupconfig.h
blob: 35e98069aa7be5473f143ecbe769ef33f3cacc04 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// 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>

namespace searchcorespi::index {

/**
 * Keeps all config for controlling warmup.
 **/
class WarmupConfig {
public:
    WarmupConfig() : _duration(vespalib::duration::zero()), _unpack(false) { }
    WarmupConfig(vespalib::duration duration, bool unpack) : _duration(duration), _unpack(unpack) { }
    vespalib::duration getDuration() const { return _duration; }
    bool getUnpack() const { return _unpack; }
private:
    const vespalib::duration _duration;
    const bool               _unpack;
};

}