Click or drag to resize

DCAwareRoundRobinPolicy Constructor (String, Int32)

Note: This API is now obsolete.

Creates a new DCAwareRoundRobin policy given the name of the local datacenter and that uses the provided number of host per remote datacenter as failover for the local hosts.

The name of the local datacenter provided must be the local datacenter name as known by Cassandra.

Namespace:  Dse
Assembly:  Dse (in Dse.dll) Version: 2.6.0
Syntax
C#
[ObsoleteAttribute("The usedHostsPerRemoteDc parameter will be removed in the next major release of the driver. DC failover should not be done in the driver, which does not have the necessary context to know what makes sense considering application semantics. See https://datastax-oss.atlassian.net/browse/CSHARP-722")]
public DCAwareRoundRobinPolicy(
	string localDc,
	int usedHostsPerRemoteDc
)

Parameters

localDc
Type: SystemString
The name of the local datacenter (as known by Cassandra).
usedHostsPerRemoteDc
Type: SystemInt32
The number of host per remote datacenter that policies created by the returned factory should consider. Created policies distance method will return a HostDistance.Remote distance for only usedHostsPerRemoteDc hosts per remote datacenter. Other hosts of the remote datacenters will be ignored (and thus no connections to them will be maintained).

Note that this parameter will be removed in the next major release of the driver.

See Also