class DefaultLoadBalancingPolicy
A load-balancing policy implementation that attempts to fairly distribute the load based on the amount of in-flight request per hosts. The local replicas are initially shuffled and between the first two nodes in the shuffled list, the one with fewer in-flight requests is selected as coordinator.
Additionally, it detects unresponsive replicas and reorders them at the back of the query plan.
For graph analytics queries, it uses the preferred analytics graph server previously obtained by driver as first host in the query plan.
Constructor
Methods
getDistance
(Host
host)
Returns the distance assigned by this policy to the provided host, relatively to the client instance.
getOptions
()Gets an associative array containing the policy options.
Initializes the load balancing policy, called after the driver obtained the information of the cluster.
Returns a host iterator to be used for a query execution.