|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.netflix.astyanax.connectionpool.impl.SmaLatencyScoreStrategyImpl
public class SmaLatencyScoreStrategyImpl
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.netflix.astyanax.connectionpool.LatencyScoreStrategy |
---|
LatencyScoreStrategy.Instance, LatencyScoreStrategy.Listener |
Constructor Summary | |
---|---|
SmaLatencyScoreStrategyImpl(int updateInterval,
int resetInterval,
int windowSize,
double badnessThreshold)
|
Method Summary | ||
---|---|---|
LatencyScoreStrategy.Instance |
createInstance()
Create a new instance to associate with an endpoint |
|
double |
getBadnessThreshold()
|
|
String |
getName()
|
|
int |
getResetInterval()
|
|
int |
getUpdateInterval()
|
|
int |
getWindowSize()
|
|
protected LatencyScoreStrategy.Instance |
internalCreateInstance()
|
|
void |
removeInstance(LatencyScoreStrategy.Instance instance)
Remove the instance for an endpoint that is no longer being tracked |
|
void |
reset()
Reset all instance scores |
|
void |
shutdown()
Shutdown the threads created by calling start() |
|
|
sortAndfilterPartition(List<HostConnectionPool<CL>> srcPools,
AtomicBoolean prioritized)
Sorts and filters a list of hosts by looking at their up state and score. |
|
void |
start(LatencyScoreStrategy.Listener listener)
Start updating stats for instances created using createInstance. |
|
String |
toString()
|
|
void |
update()
Update all instance scores |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SmaLatencyScoreStrategyImpl(int updateInterval, int resetInterval, int windowSize, double badnessThreshold)
Method Detail |
---|
protected LatencyScoreStrategy.Instance internalCreateInstance()
public final LatencyScoreStrategy.Instance createInstance()
LatencyScoreStrategy
createInstance
in interface LatencyScoreStrategy
public int getUpdateInterval()
public int getResetInterval()
public double getBadnessThreshold()
public int getWindowSize()
public void start(LatencyScoreStrategy.Listener listener)
LatencyScoreStrategy
start
in interface LatencyScoreStrategy
public void shutdown()
LatencyScoreStrategy
shutdown
in interface LatencyScoreStrategy
public void removeInstance(LatencyScoreStrategy.Instance instance)
LatencyScoreStrategy
removeInstance
in interface LatencyScoreStrategy
public <CL> List<HostConnectionPool<CL>> sortAndfilterPartition(List<HostConnectionPool<CL>> srcPools, AtomicBoolean prioritized)
LatencyScoreStrategy
sortAndfilterPartition
in interface LatencyScoreStrategy
prioritized
- - Will be set to true if the filtered data is prioritized or
not. If prioritized then the first element should be selected
from by the load balancing strategy. Otherwise round robin
could be used.
public String getName()
public String toString()
toString
in class Object
public void update()
LatencyScoreStrategy
update
in interface LatencyScoreStrategy
public void reset()
LatencyScoreStrategy
reset
in interface LatencyScoreStrategy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |