aboutsummaryrefslogtreecommitdiffstats
path: root/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/configserver/orchestrator/Orchestrator.java
blob: 41b77d914fe19f3b338a5462dde5ee7bfe015517 (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
34
35
36
// Copyright Yahoo. 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 {

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

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

    /**
     * Suspends a list of nodes on a parent.
     *
     * @throws OrchestratorException if batch suspend was denied
     */
    void suspend(String parentHostName, List<String> hostNames);

}