aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/dispatch/rpc/RpcPingFactory.java
blob: 7d9b3ca1034d490ad43e8c3dc3adee250d717a26 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.dispatch.rpc;

import com.yahoo.search.cluster.ClusterMonitor;
import com.yahoo.search.dispatch.searchcluster.Node;
import com.yahoo.search.dispatch.searchcluster.PingFactory;
import com.yahoo.search.dispatch.searchcluster.Pinger;
import com.yahoo.search.dispatch.searchcluster.PongHandler;

public class RpcPingFactory implements PingFactory {
    private final RpcResourcePool rpcResourcePool;
    public RpcPingFactory(RpcResourcePool rpcResourcePool) {
        this.rpcResourcePool = rpcResourcePool;
    }
    @Override
    public Pinger createPinger(Node node, ClusterMonitor<Node> monitor, PongHandler pongHandler) {
        return new RpcPing(node, monitor, rpcResourcePool, pongHandler);
    }
}