private fun createCompactionClients(jmxConfig: CassandraJmxCompactionConfig): ImmutableSet<CassandraJmxCompactionClient?>? { val clients: MutableSet<CassandraJmxCompactionClient> = Sets.newHashSet() val servers: Set<InetSocketAddress> = config.servers() val jmxPort: Int = jmxConfig.port() for (addr in servers) { val client: CassandraJmxCompactionClient = createCompactionClient( addr.getHostString(), jmxPort, jmxConfig.username(), jmxConfig.password() ) clients.add(client) } return ImmutableSet.copyOf(clients) }
Return an empty set if no client can be created .