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

import ai.vespa.http.DomainName;
import com.yahoo.config.provision.ApplicationId;

import java.util.List;
import java.util.Optional;

/**
 * The DuperModel's API for infrastructure applications.
 *
 * @author hakonhall
 */
public interface DuperModelInfraApi {

    /** Returns the list of supported infrastructure applications. */
    List<InfraApplicationApi> getSupportedInfraApplications();

    /** Returns a supported infrastructure with the given application id or empty if not found */
    Optional<InfraApplicationApi> getInfraApplication(ApplicationId applicationId);

    /** Returns true if the DuperModel has registered the infrastructure application as active. */
    boolean infraApplicationIsActive(ApplicationId applicationId);

    /** Update the DuperModel: A supported infrastructure application has been (re)activated or is active. */
    void infraApplicationActivated(ApplicationId applicationId, List<DomainName> hostnames);

    /** Update the DuperModel: A supported infrastructure application has been removed or is not active. */
    void infraApplicationRemoved(ApplicationId applicationId);

    /** All infra applications that are supposed to activate on config server bootstrap has been activated. */
    void infraApplicationsIsNowComplete();

}