|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object me.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(CassandraHost host)
|
double |
getBadnessThreshold()
|
HClientPool |
getPool(Collection<HClientPool> pools,
Set<CassandraHost> 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)
getPool
in interface LoadBalancingPolicy
public HClientPool createConnection(CassandraHost host)
createConnection
in interface LoadBalancingPolicy
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 |