public class DCAwareRoundRobinPolicyFactory extends Object implements LoadBalancingPolicyFactory
DCAwareRoundRobinPolicy instances.
Configuration Parameters:
| Name | Default | Description |
| localDC | No default. | The name of the local datacenter (as known by Cassandra). |
| usedHostsPerRemoteDC | No default. May only be specified when localDC is specified. | The number of host per remote datacenter that policies created by the returned factory should consider. |
| allowRemoteDCsForLocalConsistencyLevel | No default. May only be specified when localDC and usedHostsPerRemoteDC are specified. | Whether or not the policy may return remote host when building query plan for query having consitency LOCAL_ONE and LOCAL_QUORUM. |
| Constructor and Description |
|---|
DCAwareRoundRobinPolicyFactory() |
| Modifier and Type | Method and Description |
|---|---|
com.datastax.driver.core.policies.LoadBalancingPolicy |
build() |
Boolean |
getAllowRemoteDCsForLocalConsistencyLevel() |
String |
getLocalDC() |
Integer |
getUsedHostsPerRemoteDC() |
void |
setAllowRemoteDCsForLocalConsistencyLevel(Boolean allowRemoteDCsForLocalConsistencyLevel) |
void |
setLocalDC(String localDC) |
void |
setUsedHostsPerRemoteDC(Integer usedHostsPerRemoteDC) |
public String getLocalDC()
public void setLocalDC(String localDC)
public Integer getUsedHostsPerRemoteDC()
public void setUsedHostsPerRemoteDC(Integer usedHostsPerRemoteDC)
public Boolean getAllowRemoteDCsForLocalConsistencyLevel()
public void setAllowRemoteDCsForLocalConsistencyLevel(Boolean allowRemoteDCsForLocalConsistencyLevel)
public com.datastax.driver.core.policies.LoadBalancingPolicy build()
build in interface LoadBalancingPolicyFactoryCopyright © 2016 Composable Systems Limited. All rights reserved.