summaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/cluster/NodeManager.java
blob: 7071867c8c7a6a6ba5dd1029a3344e5968ab29ee (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
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.cluster;

import java.util.concurrent.Executor;

/**
 * Must be implemented by a node collection which wants
 * it's node state monitored by a ClusterMonitor
 *
 * @author  <a href="mailto:bratseth@yahoo-inc.com">Jon S Bratseth</a>
 */
public interface NodeManager<T> {

    /** Called when a failed node is working (ready for production) again */
    public void working(T node);

    /** Called when a working node fails */
    public void failed(T node);

    /** Called when a node should be pinged */
    public void ping(T node, Executor executor);

}