blob: 0ca509d13f10046d4f9aead51b8d053dee201322 (
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 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.orchestrator.model;
import com.yahoo.config.provision.ApplicationId;
import com.yahoo.vespa.applicationmodel.HostName;
import com.yahoo.vespa.orchestrator.status.ApplicationInstanceStatus;
import com.yahoo.vespa.orchestrator.status.HostStatus;
import java.util.List;
/**
* The API a Policy has access to
*/
public interface ApplicationApi {
/**
* @return The 3-part application ID of the form tenant:name:instance.
*/
ApplicationId applicationId();
/**
* The policy acts on some subset of nodes in the application.
*/
NodeGroup getNodeGroup();
List<ClusterApi> getClusters();
ApplicationInstanceStatus getApplicationStatus();
void setHostState(HostName hostName, HostStatus status);
List<HostName> getNodesInGroupWithStatus(HostStatus status);
List<StorageNode> getStorageNodesInGroupInClusterOrder();
List<StorageNode> getUpStorageNodesInGroupInClusterOrder();
List<StorageNode> getStorageNodesAllowedToBeDownInGroupInReverseClusterOrder();
}
|