public interface

LatencyScoreStrategy

com.netflix.astyanax.connectionpool.LatencyScoreStrategy
Known Indirect Subclasses

Summary

Nested Classes
interface LatencyScoreStrategy.Instance Single instance of this strategy associated with an endpoint  
interface LatencyScoreStrategy.Listener  
Public Methods
abstract LatencyScoreStrategy.Instance createInstance()
Create a new instance to associate with an endpoint
abstract void removeInstance(LatencyScoreStrategy.Instance instance)
Remove the instance for an endpoint that is no longer being tracked
abstract void reset()
Reset all instance scores
abstract void shutdown()
Shutdown the threads created by calling start()
abstract <CL> List<HostConnectionPool<CL>> sortAndfilterPartition(List<HostConnectionPool<CL>> pools, AtomicBoolean prioritized)
Sorts and filters a list of hosts by looking at their up state and score.
abstract void start(LatencyScoreStrategy.Listener listener)
Start updating stats for instances created using createInstance.
abstract void update()
Update all instance scores

Public Methods

public abstract LatencyScoreStrategy.Instance createInstance ()

Create a new instance to associate with an endpoint

public abstract void removeInstance (LatencyScoreStrategy.Instance instance)

Remove the instance for an endpoint that is no longer being tracked

public abstract void reset ()

Reset all instance scores

public abstract void shutdown ()

Shutdown the threads created by calling start()

public abstract List<HostConnectionPool<CL>> sortAndfilterPartition (List<HostConnectionPool<CL>> pools, AtomicBoolean prioritized)

Sorts and filters a list of hosts by looking at their up state and score.

Parameters
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 abstract void start (LatencyScoreStrategy.Listener listener)

Start updating stats for instances created using createInstance. This usually spawns an update thread as well as a reset thread operating at configurable intervals

public abstract void update ()

Update all instance scores