blob: 351b68b3b57b530c9a11fa1c55a3a0637bb6b953 (
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 Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.clustercontroller.core.listeners;
import com.yahoo.vdslib.state.Node;
import com.yahoo.vdslib.state.NodeState;
import com.yahoo.vespa.clustercontroller.core.NodeInfo;
import com.yahoo.vespa.clustercontroller.core.hostinfo.HostInfo;
/**
* Implemented by classes wanting events when there are node changes.
*/
public interface NodeListener {
default void handleNewNodeState(NodeInfo currentInfo, NodeState newState) {}
default void handleNewWantedNodeState(NodeInfo node, NodeState newState) {}
/** Invoked after NodeInfo has been removed from the content cluster. */
default void handleRemovedNode(Node node) {}
/**
* For every getnodestate RPC call, handleUpdatedHostInfo() will be called with the host info JSON string.
*/
default void handleUpdatedHostInfo(NodeInfo node, HostInfo newHostInfo) {}
}
|