Augments

  • LoadBalancingPolicy

Constructor

new

TokenAwarePolicy

(LoadBalancingPolicy childPolicy)

A wrapper load balancing policy that add token awareness to a child policy.

Parameters:
Name Type Description
childPolicy LoadBalancingPolicy

Methods

newQueryPlan

(String keyspace, queryOptions, function callback)

Returns the hosts to use for a new query. The returned plan will first return replicas (whose HostDistance for the child policy is local) for the query if it can determine them is not. Following what it will return the plan of the child policy.

Parameters:
Name Type Description
keyspace String

Name of the keyspace

queryOptions
callback function