public class DynamicLoadBalancingPolicy extends Object implements LoadBalancingPolicy
| Constructor and Description |
|---|
DynamicLoadBalancingPolicy() |
| Modifier and Type | Method and Description |
|---|---|
HClientPool |
createConnection(HClientFactory clientFactory,
CassandraHost host,
CassandraClientMonitor monitor)
Creates a connection pool for
host. |
double |
getBadnessThreshold() |
HClientPool |
getPool(Collection<HClientPool> pools,
Set<CassandraHost> excludeHosts)
Retrieves a pool from the collection of
pools excluding excludeHosts. |
int |
getResetInterval() |
int |
getUpdateInterval() |
void |
setBadnessThreshold(double badness)
This is the percentage of badness which is acceptable...
|
void |
setResetInterval(int resetInterval)
Set the configured interval for the stats to be reset so that the new stats are allowed and we can get rid of bad
nodes value.
|
void |
setUpdateInterval(int updateInterval)
Set the configured interval for the stats to be recalculated (until this time it is been cached.
|
public HClientPool getPool(Collection<HClientPool> pools, Set<CassandraHost> excludeHosts)
LoadBalancingPolicypools excluding excludeHosts.getPool in interface LoadBalancingPolicypools - collection of all available poolsexcludeHosts - excluded poolspublic HClientPool createConnection(HClientFactory clientFactory, CassandraHost host, CassandraClientMonitor monitor)
LoadBalancingPolicyhost.createConnection in interface LoadBalancingPolicyclientFactory - an instance of HClientFactoryhost - an instance of CassandraHost representing the host this pool will representmonitor - the monitor exposing JMX methodspublic int getUpdateInterval()
public void setUpdateInterval(int updateInterval)
updateInterval - In ms.public int getResetInterval()
public void setResetInterval(int resetInterval)
resetInterval - in mspublic double getBadnessThreshold()
public void setBadnessThreshold(double badness)
badness - in %Copyright © 2014. All Rights Reserved.