@Test public void testClose() throws IOException { NetworkClient compositeClient = factory.getNetworkClient(); compositeClient.close(); verify(diskMocks.client).close(); verify(cloudMocks.client).close(); }
@Override public void close() { childNetworkClients.values().forEach(NetworkClient::close); Utils.shutDownExecutorService(executor, 1, TimeUnit.MINUTES); }
CompositeNetworkClient implements NetworkClient { @Override public void close() { childNetworkClients.values().forEach(NetworkClient::close); Utils.shutDownExecutorService(executor, 1, TimeUnit.MINUTES); } }
CompositeNetworkClient implements NetworkClient { @Override public void close() { childNetworkClients.values().forEach(NetworkClient::close); Utils.shutDownExecutorService(executor, 1, TimeUnit.MINUTES); } CompositeNetworkClient(EnumMap<ReplicaType, NetworkClient> childNetworkClients); }
CompositeNetworkClient implements NetworkClient { @Override public void close() { childNetworkClients.values().forEach(NetworkClient::close); Utils.shutDownExecutorService(executor, 1, TimeUnit.MINUTES); } CompositeNetworkClient(EnumMap<ReplicaType, NetworkClient> childNetworkClients); @Override List<ResponseInfo> sendAndPoll(List<RequestInfo> allRequestsToSend, Set<Integer> allRequestsToDrop,
      int pollTimeoutMs); @Override int warmUpConnections(List<DataNodeId> dataNodeIds, int connectionWarmUpPercentagePerDataNode,
      long timeForWarmUp, List<ResponseInfo> responseInfoList); @Override void wakeup(); @Override void close(); }
CompositeNetworkClient implements NetworkClient { @Override public void close() { childNetworkClients.values().forEach(NetworkClient::close); Utils.shutDownExecutorService(executor, 1, TimeUnit.MINUTES); } CompositeNetworkClient(EnumMap<ReplicaType, NetworkClient> childNetworkClients); @Override List<ResponseInfo> sendAndPoll(List<RequestInfo> allRequestsToSend, Set<Integer> allRequestsToDrop,
      int pollTimeoutMs); @Override int warmUpConnections(List<DataNodeId> dataNodeIds, int connectionWarmUpPercentagePerDataNode,
      long timeForWarmUp, List<ResponseInfo> responseInfoList); @Override void wakeup(); @Override void close();  }