@Test public void findAll_emptyManifest() throws Exception { expect(zergConnector.getHosts()).andReturn(ImmutableSet.<ZergHost>of()); replayAll(); assertEquals(ImmutableSet.of(), dao.findAll()); }
@Override public ImmutableSet<CassandraRing> findAll() throws BackingStoreException { ImmutableSet.Builder<CassandraRing> ringBuilder = ImmutableSet.builder(); ZergHosts hosts = ZergHosts.from(zergConnector.getHosts()); for (String ring : hosts.rings()) { ringBuilder.add(buildRingFromHosts(ring, hosts)); } return ringBuilder.build(); }
ZergCassandraRingDao implements CassandraRingDao { @Override public ImmutableSet<CassandraRing> findAll() throws BackingStoreException { ImmutableSet.Builder<CassandraRing> ringBuilder = ImmutableSet.builder(); ZergHosts hosts = ZergHosts.from(zergConnector.getHosts()); for (String ring : hosts.rings()) { ringBuilder.add(buildRingFromHosts(ring, hosts)); } return ringBuilder.build(); } }
ZergCassandraRingDao implements CassandraRingDao { @Override public ImmutableSet<CassandraRing> findAll() throws BackingStoreException { ImmutableSet.Builder<CassandraRing> ringBuilder = ImmutableSet.builder(); ZergHosts hosts = ZergHosts.from(zergConnector.getHosts()); for (String ring : hosts.rings()) { ringBuilder.add(buildRingFromHosts(ring, hosts)); } return ringBuilder.build(); } @Inject  ZergCassandraRingDao(ZergConnector zergConnector,
      @Named(ZergDaoModule.ZERG_REGION_PROPERTY) String currentRegion,
      @Named(ZergDaoModule.ZERG_CASSANDRA_RING_SCOPES) Map<String, String> ringScopes); }
ZergCassandraRingDao implements CassandraRingDao { @Override public ImmutableSet<CassandraRing> findAll() throws BackingStoreException { ImmutableSet.Builder<CassandraRing> ringBuilder = ImmutableSet.builder(); ZergHosts hosts = ZergHosts.from(zergConnector.getHosts()); for (String ring : hosts.rings()) { ringBuilder.add(buildRingFromHosts(ring, hosts)); } return ringBuilder.build(); } @Inject  ZergCassandraRingDao(ZergConnector zergConnector,
      @Named(ZergDaoModule.ZERG_REGION_PROPERTY) String currentRegion,
      @Named(ZergDaoModule.ZERG_CASSANDRA_RING_SCOPES) Map<String, String> ringScopes); @Override ImmutableSet<CassandraRing> findAll(); @Override @Nullable CassandraRing findByName(String name); @Override void save(CassandraRing ring); @Override void delete(CassandraRing ring); }
ZergCassandraRingDao implements CassandraRingDao { @Override public ImmutableSet<CassandraRing> findAll() throws BackingStoreException { ImmutableSet.Builder<CassandraRing> ringBuilder = ImmutableSet.builder(); ZergHosts hosts = ZergHosts.from(zergConnector.getHosts()); for (String ring : hosts.rings()) { ringBuilder.add(buildRingFromHosts(ring, hosts)); } return ringBuilder.build(); } @Inject  ZergCassandraRingDao(ZergConnector zergConnector,
      @Named(ZergDaoModule.ZERG_REGION_PROPERTY) String currentRegion,
      @Named(ZergDaoModule.ZERG_CASSANDRA_RING_SCOPES) Map<String, String> ringScopes); @Override ImmutableSet<CassandraRing> findAll(); @Override @Nullable CassandraRing findByName(String name); @Override void save(CassandraRing ring); @Override void delete(CassandraRing ring);  }