aboutsummaryrefslogtreecommitdiffstats
path: root/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/Communicator.java
blob: 6a6ba5a09175492d76c5bb7757153fd8183e7b1a (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.clustercontroller.core;

/**
 * Remote interface between the fleet controller and controlled nodes.
 */
public interface Communicator {

    int TRANSIENT_ERROR = 9999;

    interface Waiter<V> {
        void done(V reply);
    }

    void propagateOptions(final FleetControllerOptions options);

    void getNodeState(NodeInfo node, Waiter<GetNodeStateRequest> waiter);

    void setSystemState(ClusterStateBundle states, NodeInfo node, Waiter<SetClusterStateRequest> waiter);

    void activateClusterStateVersion(int clusterStateVersion, NodeInfo node, Waiter<ActivateClusterStateVersionRequest> waiter);

    void shutdown();

}