aboutsummaryrefslogtreecommitdiffstats
path: root/config-model-api/src/main/java/com/yahoo/config/model/api/SuperModelListener.java
blob: eb5efdef9eb77222eeb75974c35fbe707810ad4f (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.model.api;

import com.yahoo.config.provision.ApplicationId;

/**
 * Interface for those wanting to be notified about changes to the SuperModel.
 */
public interface SuperModelListener {

    /**
     * Application has been activated: Either deployed the first time,
     * internally redeployed, or externally triggered redeploy.
     */
    void applicationActivated(SuperModel superModel, ApplicationInfo application);

    /**
     * Application has been removed.
     */
    void applicationRemoved(SuperModel superModel, ApplicationId id);

    /**
     * Invoked once all applications that were supposed to be deployed on bootstrap
     * have been activated (and the respective {@link #applicationActivated(SuperModel, ApplicationInfo)
     * applicationActivated} have been invoked). The SuperModel is then said to be "complete".
     */
    void notifyOfCompleteness(SuperModel superModel);

}