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:Cassandra Assembly:
Cassandra (in Cassandra.dll) Version: 3.13.0
[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")]
publicDCAwareRoundRobinPolicy(
stringlocalDc,
intusedHostsPerRemoteDc
)
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.