com.netflix.astyanax.connectionpool.impl
Class SmaLatencyScoreStrategyInstanceImpl

java.lang.Object
  extended by com.netflix.astyanax.connectionpool.impl.SmaLatencyScoreStrategyInstanceImpl
All Implemented Interfaces:
LatencyScoreStrategy.Instance

public class SmaLatencyScoreStrategyInstanceImpl
extends Object
implements LatencyScoreStrategy.Instance


Constructor Summary
SmaLatencyScoreStrategyInstanceImpl(SmaLatencyScoreStrategyImpl strategy)
           
 
Method Summary
 void addSample(long sample)
          Add a single latency sample
 double getMean()
          Get the mean for the sample window
 double getScore()
          Get the cached score for this endpoint
 void reset()
          Reset the score and any internal stats
 void update()
          Update the score
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmaLatencyScoreStrategyInstanceImpl

public SmaLatencyScoreStrategyInstanceImpl(SmaLatencyScoreStrategyImpl strategy)
Method Detail

addSample

public void addSample(long sample)
Description copied from interface: LatencyScoreStrategy.Instance
Add a single latency sample

Specified by:
addSample in interface LatencyScoreStrategy.Instance

getScore

public double getScore()
Description copied from interface: LatencyScoreStrategy.Instance
Get the cached score for this endpoint

Specified by:
getScore in interface LatencyScoreStrategy.Instance
Returns:

reset

public void reset()
Description copied from interface: LatencyScoreStrategy.Instance
Reset the score and any internal stats

Specified by:
reset in interface LatencyScoreStrategy.Instance

update

public void update()
Description copied from interface: LatencyScoreStrategy.Instance
Update the score

Specified by:
update in interface LatencyScoreStrategy.Instance

getMean

public double getMean()
Description copied from interface: LatencyScoreStrategy.Instance
Get the mean for the sample window

Specified by:
getMean in interface LatencyScoreStrategy.Instance
Returns:


Copyright © 2012. All Rights Reserved.