@Test public void testOneService() { setServices("service"); Iterable<String> services = _discovery.getServices(); assertEquals(1, Iterables.size(services)); assertEquals("service", Iterables.get(services, 0)); }
@Override public Iterable<String> getServices() { Map<String, String> nodes = _nodeDiscovery.getNodes(); return Iterables.unmodifiableIterable(nodes.values()); }
ZooKeeperServiceDiscovery implements ServiceDiscovery { @Override public Iterable<String> getServices() { Map<String, String> nodes = _nodeDiscovery.getNodes(); return Iterables.unmodifiableIterable(nodes.values()); } }
ZooKeeperServiceDiscovery implements ServiceDiscovery { @Override public Iterable<String> getServices() { Map<String, String> nodes = _nodeDiscovery.getNodes(); return Iterables.unmodifiableIterable(nodes.values()); } ZooKeeperServiceDiscovery(CuratorFramework curator); @VisibleForTesting  ZooKeeperServiceDiscovery(NodeDiscovery<String> nodeDiscovery); }
ZooKeeperServiceDiscovery implements ServiceDiscovery { @Override public Iterable<String> getServices() { Map<String, String> nodes = _nodeDiscovery.getNodes(); return Iterables.unmodifiableIterable(nodes.values()); } ZooKeeperServiceDiscovery(CuratorFramework curator); @VisibleForTesting  ZooKeeperServiceDiscovery(NodeDiscovery<String> nodeDiscovery); @Override Iterable<String> getServices(); @Override void close(); }
ZooKeeperServiceDiscovery implements ServiceDiscovery { @Override public Iterable<String> getServices() { Map<String, String> nodes = _nodeDiscovery.getNodes(); return Iterables.unmodifiableIterable(nodes.values()); } ZooKeeperServiceDiscovery(CuratorFramework curator); @VisibleForTesting  ZooKeeperServiceDiscovery(NodeDiscovery<String> nodeDiscovery); @Override Iterable<String> getServices(); @Override void close();  }