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

import com.yahoo.config.provision.ClusterSpec;
import com.yahoo.config.provision.Zone;
import com.yahoo.vespa.applicationmodel.ApplicationInstanceId;
import com.yahoo.vespa.applicationmodel.InfrastructureApplication;
import com.yahoo.vespa.applicationmodel.ServiceType;

/**
 * A service/application model of the config server with health status.
 *
 * @author hakonhall
 */
public class ConfigServerApplication extends ConfigServerLikeApplication {

    public ConfigServerApplication() {
        super(InfrastructureApplication.CONFIG_SERVER, ClusterSpec.Type.admin, ServiceType.CONFIG_SERVER);
    }

    /**
     * A config server application has a particularly simple ApplicationInstanceId.
     *
     * @see InfraApplication#getApplicationInstanceId(Zone)
     */
    public ApplicationInstanceId getApplicationInstanceId() {
        return new ApplicationInstanceId(getApplicationId().application().value());
    }

}