Package com.yahoo.search.dispatch.rpc
Class RpcResourcePool
java.lang.Object
com.yahoo.search.dispatch.rpc.RpcResourcePool
- All Implemented Interfaces:
RpcConnectionPool,AutoCloseable
RpcResourcePool contains the RPC connection pool.
- Author:
- ollivir
-
Constructor Summary
ConstructorsConstructorDescriptionRpcResourcePool(com.yahoo.vespa.config.search.DispatchConfig dispatchConfig, com.yahoo.vespa.config.search.DispatchNodesConfig nodesConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Shuts down all connections in the pool, and the underlying RPC client.getConnection(int nodeId) Returns a connection to the given node id.Collection<? extends AutoCloseable>updateNodes(com.yahoo.vespa.config.search.DispatchNodesConfig nodesConfig) Will return a list of items that need a delayed close when updating node set.
-
Constructor Details
-
RpcResourcePool
public RpcResourcePool(com.yahoo.vespa.config.search.DispatchConfig dispatchConfig, com.yahoo.vespa.config.search.DispatchNodesConfig nodesConfig)
-
-
Method Details
-
updateNodes
public Collection<? extends AutoCloseable> updateNodes(com.yahoo.vespa.config.search.DispatchNodesConfig nodesConfig) Description copied from interface:RpcConnectionPoolWill return a list of items that need a delayed close when updating node set.- Specified by:
updateNodesin interfaceRpcConnectionPool
-
getConnection
Description copied from interface:RpcConnectionPoolReturns a connection to the given node id.- Specified by:
getConnectionin interfaceRpcConnectionPool
-
close
public void close()Description copied from interface:RpcConnectionPoolShuts down all connections in the pool, and the underlying RPC client.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceRpcConnectionPool
-
knownNodeIds
- Specified by:
knownNodeIdsin interfaceRpcConnectionPool
-