@Test public void testRegisterService() { addNode("path", FOO); assertEquals(ImmutableList.of(FOO), ImmutableList.copyOf(_discovery.getHosts())); }
@Override public Iterable<ServiceEndPoint> getHosts() { return Iterables.unmodifiableIterable(_endPoints.elementSet()); }
ZooKeeperHostDiscovery implements HostDiscovery { @Override public Iterable<ServiceEndPoint> getHosts() { return Iterables.unmodifiableIterable(_endPoints.elementSet()); } }
ZooKeeperHostDiscovery implements HostDiscovery { @Override public Iterable<ServiceEndPoint> getHosts() { return Iterables.unmodifiableIterable(_endPoints.elementSet()); } ZooKeeperHostDiscovery(CuratorFramework curator, String serviceName, MetricRegistry metrics); @VisibleForTesting  ZooKeeperHostDiscovery(NodeDiscoveryFactory factory, CuratorFramework curator, String serviceName,
                           MetricRegistry metrics); }
ZooKeeperHostDiscovery implements HostDiscovery { @Override public Iterable<ServiceEndPoint> getHosts() { return Iterables.unmodifiableIterable(_endPoints.elementSet()); } 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 Iterable<ServiceEndPoint> getHosts() { return Iterables.unmodifiableIterable(_endPoints.elementSet()); } 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);  }