com.netflix.astyanax.connectionpool
Interface LatencyScoreStrategy.Instance

All Known Implementing Classes:
SmaLatencyScoreStrategyInstanceImpl
Enclosing interface:
LatencyScoreStrategy

public static interface LatencyScoreStrategy.Instance

Single instance of this strategy associated with an endpoint


Method Summary
 void addSample(long sample, long now)
          Add a single latency sample
 long getLastSampleTime()
          Time of last sample added by calling addSample
 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(long now)
          Update the score for the current time
 

Method Detail

addSample

void addSample(long sample,
               long now)
Add a single latency sample

Parameters:
sample -
now -

getScore

double getScore()
Get the cached score for this endpoint

Returns:

reset

void reset()
Reset the score and any internal stats


update

void update(long now)
Update the score for the current time

Parameters:
now -

getMean

double getMean()
Get the mean for the sample window

Returns:

getLastSampleTime

long getLastSampleTime()
Time of last sample added by calling addSample

Returns:


Copyright © 2012. All Rights Reserved.