DCAwareRoundRobinPolicy Constructor (String, Int32) |
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: CassandraAssembly: Cassandra (in Cassandra.dll) Version: 3.7.0
Syntax 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).
See Also