Add support for a discovery service in Cluster.Builder
Description
In a hosted cassandra service, it will be great for client to have the ability to discover the cassandra nodes instead of providing the individual contact points. This can be achieved by adding an interface
This is now possible in Java driver 4: you can plug in a custom TopologyMonitor to override how the driver discovers nodes and reads their properties. This can completely bypass gossip events and system table queries.
In a hosted cassandra service, it will be great for client to have the ability to discover the cassandra nodes instead of providing the individual contact points. This can be achieved by adding an interface
interface NodeDiscoveryService {
List<String> getContactPoints(String clusterName);
}
And expose a new method Cassandra.Builder.withNodeDiscoveryService(NodeDiscoveryService nodeDiscoveryService)
It will be even better if this discovery service can provide a way not to rely on System.peers which is known to get corrupt at times.