datastax/java-driver — pull request #186 by olim7t (2014-06-23 13:53:05+00:00)
Title: Avoid LoadBalancingPolicy onDown+onUp at startup (JAVA-315).

Second attempt for this fix, with the alternate approach discussed in JIRA.

As suggested, I've created a dummy policy just for startup. We switch to the real one just after we've set the nodes' location info for the first time; as a consequence, `LoadBalancyPolicy#init()` is called with "complete" nodes.

We still get an "onDown+onUp+onAdd" sequence when a new node is added, but that's OK if policies ignore onDown for unknown nodes (see the change in the DC-aware one).