aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/server/ibucketstatecalculator.h
blob: a2790979212170b34f8cf21effeacad8f60f5923 (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/trinary.h>

namespace document { class Bucket; }

namespace proton {

struct IBucketStateCalculator
{
    virtual vespalib::Trinary shouldBeReady(const document::Bucket &bucket) const = 0;
    virtual bool clusterUp() const = 0;
    virtual bool nodeUp() const = 0;
    virtual bool nodeInitializing() const = 0;
    virtual bool nodeRetired() const = 0;
    virtual bool nodeMaintenance() const noexcept = 0;
    virtual ~IBucketStateCalculator() = default;
};

} // namespace proton