aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storage/distributor/maintenance/pending_window_checker.h
blob: 8a333a3073c4615133c448cdeabbfbb3525098be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include <vespa/storage/distributor/operationstarter.h>

namespace storage::distributor {

/**
 * Allows for easily and cheaply checking if an operation with a given internal maintenance
 * priority could possibly be started "downstream" due to there being available capacity
 * in the maintenance pending window.
 */
class PendingWindowChecker {
public:
    virtual ~PendingWindowChecker() = default;
    [[nodiscard]] virtual bool may_allow_operation_with_priority(OperationStarter::Priority) const noexcept = 0;
};

}