public class ImmutableSampleWindow extends java.lang.Object implements Limit.SampleWindow
Constructor and Description |
---|
ImmutableSampleWindow() |
ImmutableSampleWindow(long minRtt,
long sum,
int maxInFlight,
int sampleCount,
boolean didDrop) |
Modifier and Type | Method and Description |
---|---|
ImmutableSampleWindow |
addDroppedSample(int maxInFlight) |
ImmutableSampleWindow |
addSample(long rtt,
int maxInFlight) |
boolean |
didDrop() |
long |
getCandidateRttNanos() |
int |
getMaxInFlight() |
long |
getRttSumNanos() |
int |
getSampleCount() |
java.lang.String |
toString() |
public ImmutableSampleWindow()
public ImmutableSampleWindow(long minRtt, long sum, int maxInFlight, int sampleCount, boolean didDrop)
public ImmutableSampleWindow addSample(long rtt, int maxInFlight)
public ImmutableSampleWindow addDroppedSample(int maxInFlight)
public long getCandidateRttNanos()
getCandidateRttNanos
in interface Limit.SampleWindow
public long getRttSumNanos()
getRttSumNanos
in interface Limit.SampleWindow
public int getMaxInFlight()
getMaxInFlight
in interface Limit.SampleWindow
public int getSampleCount()
getSampleCount
in interface Limit.SampleWindow
public boolean didDrop()
didDrop
in interface Limit.SampleWindow
public java.lang.String toString()
toString
in class java.lang.Object