Package com.yahoo.search.dispatch.rpc
Class RpcResourcePool
java.lang.Object
com.yahoo.search.dispatch.rpc.RpcResourcePool
- All Implemented Interfaces:
RpcConnectionPool
,AutoCloseable
RpcResourcePool constructs
FillInvoker
objects that communicate with content nodes over RPC. It also contains
the RPC connection pool.- Author:
- ollivir
-
Constructor Summary
ConstructorDescriptionRpcResourcePool
(com.yahoo.vespa.config.search.DispatchConfig dispatchConfig, com.yahoo.vespa.config.search.DispatchNodesConfig nodesConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
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:RpcConnectionPool
Will return a list of items that need a delayed close when updating node set.- Specified by:
updateNodes
in interfaceRpcConnectionPool
-
getConnection
Description copied from interface:RpcConnectionPool
Returns a connection to the given node id.- Specified by:
getConnection
in interfaceRpcConnectionPool
-
close
public void close()Description copied from interface:RpcConnectionPool
Shuts down all connections in the pool, and the underlying RPC client.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceRpcConnectionPool
-