@Test public void testAlreadyExistingEndPointsDoNotFireEvents() throws Exception { addNode("path", FOO); CountingListener endPointListener = new CountingListener(); _discovery.addListener(endPointListener); assertEquals(0, endPointListener.getNumEvents()); }
@Override public void addListener(EndPointListener listener) { _listeners.add(listener); _numListeners.inc(); }
ZooKeeperHostDiscovery implements HostDiscovery { @Override public void addListener(EndPointListener listener) { _listeners.add(listener); _numListeners.inc(); } }
ZooKeeperHostDiscovery implements HostDiscovery { @Override public void addListener(EndPointListener listener) { _listeners.add(listener); _numListeners.inc(); } ZooKeeperHostDiscovery(CuratorFramework curator, String serviceName, MetricRegistry metrics); @VisibleForTesting  ZooKeeperHostDiscovery(NodeDiscoveryFactory factory, CuratorFramework curator, String serviceName,
                           MetricRegistry metrics); }
ZooKeeperHostDiscovery implements HostDiscovery { @Override public void addListener(EndPointListener listener) { _listeners.add(listener); _numListeners.inc(); } 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 addListener(EndPointListener listener) { _listeners.add(listener); _numListeners.inc(); } 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);  }