aboutsummaryrefslogtreecommitdiffstats
path: root/config/src/vespa/config/common/configrequest.h
blob: 5c06f199b4a88cb72b99cbe190f252dabb6f6c42 (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include <memory>

namespace config {

class ConfigKey;
struct ConfigState;

/**
 * Baseclass for config requests.
 *
 * @author <a href="gv@yahoo-inc.com">Gj&oslash;ran Voldengen</a>
 * @version : $Id: configrequest.h 125304 2011-08-25 07:53:59Z Ulf Lilleengen $
 */

class ConfigRequest {
public:
    ConfigRequest() = default;
    ConfigRequest(const ConfigRequest&) = delete;
    ConfigRequest& operator=(const ConfigRequest&) = delete;
    virtual ~ConfigRequest() = default;
    virtual const ConfigKey & getKey() const = 0;
    /** Abort a request. */
    virtual bool abort() = 0;
    virtual void setError(int errorCode) = 0;
    virtual bool verifyState(const ConfigState & state) const = 0;

};

}