The distance of an host influence how much connections are kept to the node (see {@link HostDistance}). A policy should assign a {@code LOCAL} distance to nodes that are susceptible to be returned first by{@code newQueryPlan} and it is useless for {@code newQueryPlan} toreturn hosts to which it assigns an {@code IGNORED} distance.
The host distance is primarily used to prevent keeping too many connections to host in remote datacenters when the policy itself always picks host in the local datacenter first. @param host the host of which to return the distance of. @return the HostDistance to {@code host}.
|
|
|
|