@Test public void testClose() throws IOException { addNode("path", FOO); _discovery.close(); assertTrue(Iterables.isEmpty(_discovery.getHosts())); _discovery = null; }
@Override public void close() throws IOException { _nodeDiscovery.close(); _endPoints.clear(); _metrics.close(); }
ZooKeeperHostDiscovery implements HostDiscovery { @Override public void close() throws IOException { _nodeDiscovery.close(); _endPoints.clear(); _metrics.close(); } }
ZooKeeperHostDiscovery implements HostDiscovery { @Override public void close() throws IOException { _nodeDiscovery.close(); _endPoints.clear(); _metrics.close(); } ZooKeeperHostDiscovery(CuratorFramework curator, String serviceName, MetricRegistry metrics); @VisibleForTesting  ZooKeeperHostDiscovery(NodeDiscoveryFactory factory, CuratorFramework curator, String serviceName,
                           MetricRegistry metrics); }
ZooKeeperHostDiscovery implements HostDiscovery { @Override public void close() throws IOException { _nodeDiscovery.close(); _endPoints.clear(); _metrics.close(); } ZooKeeperHostDiscovery(CuratorFramework curator, String serviceName, MetricRegistry metrics); @VisibleForTesting  ZooKeeperHostDiscovery(NodeDiscoveryFactory factory, CuratorFramework curator, String serviceName,
                           MetricRegistry metrics); @Override Iterable<ServiceEndPoint> getHosts(); @Override void addListener(EndPointListener listener); @Override void removeListener(EndPointListener listener); @Override void close(); static String makeServicePath(String serviceName); }
ZooKeeperHostDiscovery implements HostDiscovery { @Override public void close() throws IOException { _nodeDiscovery.close(); _endPoints.clear(); _metrics.close(); } ZooKeeperHostDiscovery(CuratorFramework curator, String serviceName, MetricRegistry metrics); @VisibleForTesting  ZooKeeperHostDiscovery(NodeDiscoveryFactory factory, CuratorFramework curator, String serviceName,
                           MetricRegistry metrics); @Override Iterable<ServiceEndPoint> getHosts(); @Override void addListener(EndPointListener listener); @Override void removeListener(EndPointListener listener); @Override void close(); static String makeServicePath(String serviceName);  }