summaryrefslogtreecommitdiffstats
path: root/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/noderepository/NodeRepository.java
blob: d14cd2f1330393b0d103e07e631f2521bfcc19f9 (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
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.admin.noderepository;

import com.yahoo.vespa.hosted.node.admin.ContainerAclSpec;
import com.yahoo.vespa.hosted.node.admin.ContainerNodeSpec;
import com.yahoo.vespa.hosted.node.admin.nodeagent.NodeAttributes;

import java.io.IOException;
import java.util.List;
import java.util.Optional;

/**
 * @author stiankri
 */
public interface NodeRepository {
    List<ContainerNodeSpec> getContainersToRun() throws IOException;

    Optional<ContainerNodeSpec> getContainerNodeSpec(String hostName);

    List<ContainerAclSpec> getContainerAclSpecs(String hostName);

    void updateNodeAttributes(String hostName, NodeAttributes nodeAttributes);

    void markAsDirty(String hostName);

    void markNodeAvailableForNewAllocation(String hostName);
}