|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectme.prettyprint.cassandra.connection.DynamicLoadBalancingPolicy
public class DynamicLoadBalancingPolicy
This LB Algorithm has the Phi algo which Dynamic snitch uses, LB is based on the probablity of failure of the node. TODO: Make cassandra code abstracted enough so we can inherit from the same.
| Constructor Summary | |
|---|---|
DynamicLoadBalancingPolicy()
|
|
| Method Summary | |
|---|---|
HClientPool |
createConnection(HClientFactory clientFactory,
CassandraHost host)
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DynamicLoadBalancingPolicy()
| Method Detail |
|---|
public HClientPool getPool(Collection<HClientPool> pools,
Set<CassandraHost> excludeHosts)
LoadBalancingPolicypools excluding excludeHosts.
getPool in interface LoadBalancingPolicypools - collection of all available poolsexcludeHosts - excluded pools
public HClientPool createConnection(HClientFactory clientFactory,
CassandraHost host)
LoadBalancingPolicyhost.
createConnection in interface LoadBalancingPolicyclientFactory - an instance of HClientFactoryhost - an instance of CassandraHost representing the host this pool will represent
public 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 %
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||