aboutsummaryrefslogtreecommitdiffstats
path: root/config-provisioning/src/main/java/com/yahoo/config/provision/Deployment.java
blob: 5caa910b17e86c148270c18453941f7b064d6e9d (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.provision;

/**
 * A deployment of an application
 *
 * @author bratseth
 */
public interface Deployment {

    /**
     * Prepares activation of this deployment.
     * This will do all validation and preparatory steps in the system such that a subsequent activation should
     * be fast and error free.
     */
    void prepare();

    /**
     * Activates this deployment. This will prepare it if necessary.
     *
     * @return the application config generation that became active by this invocation
     */
    long activate();

    /**
     * Request a restart of services of this application on hosts matching the filter.
     * This is sometimes needed after activation, but can also be requested without
     * doing prepare and activate in the same session.
     */
    void restart(HostFilter filter);

}