public class ImmutableSample extends java.lang.Object implements Limit.SampleWindow
Constructor and Description |
---|
ImmutableSample() |
ImmutableSample(long minRtt,
int maxInFlight,
int sampleCount,
boolean didDrop) |
Modifier and Type | Method and Description |
---|---|
ImmutableSample |
addDroppedSample(int maxInFlight) |
ImmutableSample |
addSample(long rtt,
int maxInFlight) |
boolean |
didDrop() |
long |
getCandidateRttNanos() |
int |
getMaxInFlight() |
int |
getSampleCount() |
ImmutableSample |
reset() |
java.lang.String |
toString() |
public ImmutableSample()
public ImmutableSample(long minRtt, int maxInFlight, int sampleCount, boolean didDrop)
public ImmutableSample reset()
public ImmutableSample addSample(long rtt, int maxInFlight)
public ImmutableSample addDroppedSample(int maxInFlight)
public long getCandidateRttNanos()
getCandidateRttNanos
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