com.netflix.astyanax.shallows
Class EmptyLatencyScoreStrategyImpl

java.lang.Object
  extended by com.netflix.astyanax.shallows.EmptyLatencyScoreStrategyImpl
All Implemented Interfaces:
LatencyScoreStrategy

public class EmptyLatencyScoreStrategyImpl
extends Object
implements LatencyScoreStrategy


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.netflix.astyanax.connectionpool.LatencyScoreStrategy
LatencyScoreStrategy.Instance, LatencyScoreStrategy.Listener
 
Field Summary
static EmptyLatencyScoreStrategyImpl instance
           
 
Constructor Summary
EmptyLatencyScoreStrategyImpl()
           
 
Method Summary
 LatencyScoreStrategy.Instance createInstance()
          Create a new instance to associate with an endpoint
static EmptyLatencyScoreStrategyImpl get()
           
 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()
<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.
 void start(LatencyScoreStrategy.Listener listener)
          Start updating stats for instances created using createInstance.
 String toString()
           
 void update(long now)
          Update all instance scores
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

instance

public static EmptyLatencyScoreStrategyImpl instance
Constructor Detail

EmptyLatencyScoreStrategyImpl

public EmptyLatencyScoreStrategyImpl()
Method Detail

get

public static EmptyLatencyScoreStrategyImpl get()

createInstance

public LatencyScoreStrategy.Instance createInstance()
Description copied from interface: LatencyScoreStrategy
Create a new instance to associate with an endpoint

Specified by:
createInstance in interface LatencyScoreStrategy
Returns:

removeInstance

public void removeInstance(LatencyScoreStrategy.Instance instance)
Description copied from interface: LatencyScoreStrategy
Remove the instance for an endpoint that is no longer being tracked

Specified by:
removeInstance in interface LatencyScoreStrategy

start

public void start(LatencyScoreStrategy.Listener listener)
Description copied from interface: LatencyScoreStrategy
Start updating stats for instances created using createInstance. This usually spawns an update thread as well as a reset thread operating at configurable intervals

Specified by:
start in interface LatencyScoreStrategy

shutdown

public void shutdown()
Description copied from interface: LatencyScoreStrategy
Shutdown the threads created by calling start()

Specified by:
shutdown in interface LatencyScoreStrategy

update

public void update(long now)
Description copied from interface: LatencyScoreStrategy
Update all instance scores

Specified by:
update in interface LatencyScoreStrategy

reset

public void reset()
Description copied from interface: LatencyScoreStrategy
Reset all instance scores

Specified by:
reset in interface LatencyScoreStrategy

sortAndfilterPartition

public <CL> List<HostConnectionPool<CL>> sortAndfilterPartition(List<HostConnectionPool<CL>> pools,
                                                                AtomicBoolean prioritized)
Description copied from interface: LatencyScoreStrategy
Sorts and filters a list of hosts by looking at their up state and score.

Specified by:
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.
Returns:

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.