|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LatencyScoreStrategy
Nested Class Summary | |
---|---|
static interface |
LatencyScoreStrategy.Instance
Single instance of this strategy associated with an endpoint |
static interface |
LatencyScoreStrategy.Listener
|
Method Summary | ||
---|---|---|
LatencyScoreStrategy.Instance |
createInstance()
Create a new instance to associate with an endpoint |
|
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>> pools,
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. |
|
void |
update(long now)
Update all instance scores |
Method Detail |
---|
void update(long now)
now
- void reset()
LatencyScoreStrategy.Instance createInstance()
void removeInstance(LatencyScoreStrategy.Instance instance)
instance
- void start(LatencyScoreStrategy.Listener listener)
listener
- void shutdown()
<CL> List<HostConnectionPool<CL>> sortAndfilterPartition(List<HostConnectionPool<CL>> pools, AtomicBoolean prioritized)
CL
- pools
- 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |