DCAwareRoundRobinPolicyNewQueryPlan Method |
Returns the hosts to use for a new query.
The returned plan will always
try each known host in the local datacenter first, and then, if none of the
local host is reachable, will try up to a configurable number of other host
per remote datacenter. The order of the local node in the returned query plan
will follow a Round-robin algorithm.
Namespace: CassandraAssembly: Cassandra (in Cassandra.dll) Version: 3.2.0
Syntax public IEnumerable<Host> NewQueryPlan(
string keyspace,
IStatement query
)
Parameters
- keyspace
- Type: SystemString
Keyspace on which the query is going to be executed - query
- Type: CassandraIStatement
the query for which to build the plan.
Return Value
Type:
IEnumerableHosta new query plan, i.e. an iterator indicating which host to try
first for querying, which one to use as failover, etc...
Implements
ILoadBalancingPolicyNewQueryPlan(String, IStatement)See Also