summaryrefslogtreecommitdiffstats
path: root/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/configserver/orchestrator/Orchestrator.java
blob: b5d41b7fbb481941d2cc4a1930cf4c1e5bb05ae8 (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
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.admin.configserver.orchestrator;

import java.util.List;

/**
 * Abstraction for communicating with Orchestrator.
 *
 * @author bakksjo
 */
public interface Orchestrator {
    /**
     * Invokes orchestrator suspend of a host.
     * @throws OrchestratorException if suspend was denied.
     * @throws OrchestratorNotFoundException if host is unknown to the orchestrator
     */
    void suspend(String hostName);

    /**
     * Invokes orchestrator resume of a host.
     * @throws OrchestratorException if resume was denied
     * @throws OrchestratorNotFoundException if host is unknown to the orchestrator
     */
    void resume(String hostName);

    /**
     * Invokes orchestrator suspend hosts.
     * @throws OrchestratorException if batch suspend was denied.
     */
    void suspend(String parentHostName, List<String> hostNames);
}