public abstract class ByteThroughputProvider
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
byteCount |
private long |
duration |
private ThroughputMetricType |
throughputType |
Modifier | Constructor and Description |
---|---|
protected |
ByteThroughputProvider(ThroughputMetricType type) |
Modifier and Type | Method and Description |
---|---|
int |
getByteCount() |
long |
getDurationNano() |
java.lang.String |
getProviderId()
Returns a provider id that can be used to compute the number of active
byte throughput provider of a specific metric type being active in a
given time interval.
|
ThroughputMetricType |
getThroughputMetricType() |
protected void |
increment(int bytesDelta,
long startTimeNano) |
protected void |
reset() |
java.lang.String |
toString() |
private long duration
private int byteCount
private final ThroughputMetricType throughputType
protected ByteThroughputProvider(ThroughputMetricType type)
public ThroughputMetricType getThroughputMetricType()
public int getByteCount()
public long getDurationNano()
public java.lang.String getProviderId()
protected void increment(int bytesDelta, long startTimeNano)
bytesDelta
- the number of bytes to incrementstartTimeNano
- the start time in nano secondsprotected void reset()
public java.lang.String toString()
toString
in class java.lang.Object