summaryrefslogtreecommitdiffstats
path: root/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/AdminComponent.java
blob: 9bed492bd764a1783df3adf8448487d70a2d51e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright 2018 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.component;

/**
 * An AdminComponent cannot assume anything about the environment until enable()
 * is called: Required YUM packages may not have been installed, services
 * not started, etc. An enabled AdminComponent can be disabled to disengage from
 * the environment.
 */
public interface AdminComponent {
    /**
     * Enable component. May be called more than once.
     */
    void enable();

    /**
     * Disable component. May be called more than once.
     * Must be compatible with component deconstruct().
     */
    void disable();
}