com.datastax.driver.core.Host.getMonitor()
you are encouraged not to use the HealthMonitor anymore. To test
if a node is considered UP or not, you should use Host.isUp instead. To
register a Host.StateListener , you should do so at the Cluster level
through Cluster.register(com.datastax.driver.core.Host.StateListener) (registering against the HealtMonitor does
not work as intented: listeners will only be informed of onUp and onDown
events (not onAdd and onRemove) and you need to manually register against
every host. Cluster.register(com.datastax.driver.core.Host.StateListener) solves this). |