aboutsummaryrefslogtreecommitdiffstats
path: root/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/status/HostStatus.java
blob: f561aea247815be3770c5d478b60f9be58d932d4 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.orchestrator.status;

/**
 * Enumeration of the different statuses a host can have.
 *
 * @author oyving
 */
public enum HostStatus {
    /** The services on the host is supposed to be up. */
    NO_REMARKS(false),

    /** The services on the host is allowed to be down. */
    ALLOWED_TO_BE_DOWN(true),

    /**
     * Same as ALLOWED_TO_BE_DOWN, but in addition, it is expected
     * the host may be removed from its application at any moment.
     */
    PERMANENTLY_DOWN(true);

    private final boolean suspended;

    HostStatus(boolean suspended) { this.suspended = suspended; }
    public boolean isSuspended() { return suspended; }
    public String asString() { return name(); }
}