Click or drag to resize

ILoadBalancingPolicy.NewQueryPlan Method

Returns the hosts to use for a new query.

Each new query will call this method. The first host in the result will then be used to perform the query. In the event of a connection problem (the queried host is down or appear to be so), the next host will be used. If all hosts of the returned Iterator are down, the query will fail.

Namespace:  Cassandra
Assembly:  Cassandra (in Cassandra.dll) Version: 3.13.0
Syntax
C#
IEnumerable<Host> NewQueryPlan(
	string keyspace,
	IStatement query
)

Parameters

keyspace
Type: System.String
Keyspace on which the query is going to be executed, it can be null.
query
Type: Cassandra.IStatement
The query for which to build a plan, it can be null.

Return Value

Type: IEnumerable<Host>
An iterator of Host. The query is tried against the hosts returned by this iterator in order, until the query has been sent successfully to one of the host.
See Also