summaryrefslogtreecommitdiffstats
path: root/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/resource/MeteringClient.java
blob: 767ba4aa34b90ea4f3dc19f9d80feef1bc09b8f5 (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
// 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.resource;

import com.yahoo.config.provision.ApplicationName;
import com.yahoo.config.provision.TenantName;

import java.time.YearMonth;
import java.util.Collection;
import java.util.List;

/**
 * Consumes and retrieves snapshots of resources allocated per application.
 *
 * @author olaa
 */
public interface MeteringClient {

    void consume(Collection<ResourceSnapshot> resources);

    MeteringData getMeteringData(TenantName tenantName, ApplicationName applicationName);

    List<ResourceSnapshot> getSnapshotHistoryForTenant(TenantName tenantName, YearMonth yearMonth);

    void refresh();

}