@Test public void toCassandraInstance_noAvailabilityZone() { assertNull(ZergHosts.toCassandraInstance(host("host1", "us-east", "1.1.1.1", "domain1"))); }
public static @Nullable CassandraInstance toCassandraInstance(ZergHost host) { Matcher m = ZONE_PATTERN.matcher(host.getZone()); if (m.find()) { return new CassandraInstance.Builder() .id(host.getId()) .dataCenter(m.group(1)) .rack(m.group(2)) .hostName(host.getName()) .publicIpAddress(host.getPublicIpAddress()) .fullyQualifiedDomainName(host.getFullyQualifiedDomainName()) .build(); } return null; }
ZergHosts { public static @Nullable CassandraInstance toCassandraInstance(ZergHost host) { Matcher m = ZONE_PATTERN.matcher(host.getZone()); if (m.find()) { return new CassandraInstance.Builder() .id(host.getId()) .dataCenter(m.group(1)) .rack(m.group(2)) .hostName(host.getName()) .publicIpAddress(host.getPublicIpAddress()) .fullyQualifiedDomainName(host.getFullyQualifiedDomainName()) .build(); } return null; } }
ZergHosts { public static @Nullable CassandraInstance toCassandraInstance(ZergHost host) { Matcher m = ZONE_PATTERN.matcher(host.getZone()); if (m.find()) { return new CassandraInstance.Builder() .id(host.getId()) .dataCenter(m.group(1)) .rack(m.group(2)) .hostName(host.getName()) .publicIpAddress(host.getPublicIpAddress()) .fullyQualifiedDomainName(host.getFullyQualifiedDomainName()) .build(); } return null; } private  ZergHosts(ImmutableSet<ZergHost> hosts); }
ZergHosts { public static @Nullable CassandraInstance toCassandraInstance(ZergHost host) { Matcher m = ZONE_PATTERN.matcher(host.getZone()); if (m.find()) { return new CassandraInstance.Builder() .id(host.getId()) .dataCenter(m.group(1)) .rack(m.group(2)) .hostName(host.getName()) .publicIpAddress(host.getPublicIpAddress()) .fullyQualifiedDomainName(host.getFullyQualifiedDomainName()) .build(); } return null; } private  ZergHosts(ImmutableSet<ZergHost> hosts); static ZergHosts from(Collection<ZergHost> hosts); static @Nullable CassandraInstance toCassandraInstance(ZergHost host); ImmutableSet<String> rings(); ZergHosts filterRing(final String ring); ZergHosts filterRegion(final String region); ZergHosts filterScope(Map<String, String> ringScopes, String region, String ring); ImmutableSet<ZergHost> toSet(); ImmutableSet<CassandraInstance> toCassandraInstances(); }
ZergHosts { public static @Nullable CassandraInstance toCassandraInstance(ZergHost host) { Matcher m = ZONE_PATTERN.matcher(host.getZone()); if (m.find()) { return new CassandraInstance.Builder() .id(host.getId()) .dataCenter(m.group(1)) .rack(m.group(2)) .hostName(host.getName()) .publicIpAddress(host.getPublicIpAddress()) .fullyQualifiedDomainName(host.getFullyQualifiedDomainName()) .build(); } return null; } private  ZergHosts(ImmutableSet<ZergHost> hosts); static ZergHosts from(Collection<ZergHost> hosts); static @Nullable CassandraInstance toCassandraInstance(ZergHost host); ImmutableSet<String> rings(); ZergHosts filterRing(final String ring); ZergHosts filterRegion(final String region); ZergHosts filterScope(Map<String, String> ringScopes, String region, String ring); ImmutableSet<ZergHost> toSet(); ImmutableSet<CassandraInstance> toCassandraInstances();  }