summaryrefslogtreecommitdiffstats
path: root/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/aws/ResourceTagger.java
blob: de40344c1c9cd235a254087672951ad2435e7b01 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.integration.aws;

import com.yahoo.config.provision.ApplicationId;
import com.yahoo.config.provision.HostName;
import com.yahoo.config.provision.zone.ZoneApi;

import java.util.Map;

/**
 * @author olaa
 */
public interface ResourceTagger {

    /**
     * Returns number of tagged resources
     */
    int tagResources(ZoneApi zone, Map<HostName, ApplicationId> ownerOfHosts);

    static ResourceTagger empty() {
        return (zone, tenantOfHosts) -> 0;
    }

}