public class DataUsageStatsImpl extends java.lang.Object implements DataUsageStats
| Modifier | Constructor and Description |
|---|---|
protected |
DataUsageStatsImpl() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Every stats base should be cloneable.
|
long |
getBytesReceived()
Get the amount of uncompressed bytes received for a metric representing responses from an agent endpoint.
|
long |
getBytesSent()
Get the amount of uncompressed bytes sent for a metric representing calls to an agent endpoint.
|
int |
getCount()
Get the count of the number of times the metric was set.
|
boolean |
hasData() |
void |
merge(StatsBase statsObj)
Merge the given stats into this object.
|
void |
recordDataUsage(long bytesSent,
long bytesReceived)
Record the uncompressed sizes of sent and received payloads in bytes for each agent endpoint.
|
void |
reset() |
java.lang.String |
toString() |
void |
writeJSONString(java.io.Writer writer) |
public void recordDataUsage(long bytesSent,
long bytesReceived)
recordDataUsage in interface DataUsageStatsbytesSent - uncompressed bytes sent to an agent endpointbytesReceived - uncompressed bytes received from an agent endpointpublic int getCount()
getCount in interface DataUsageStatspublic long getBytesSent()
getBytesSent in interface DataUsageStatspublic long getBytesReceived()
getBytesReceived in interface DataUsageStatspublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
StatsBasepublic java.lang.String toString()
toString in class java.lang.Objectpublic void writeJSONString(java.io.Writer writer)
throws java.io.IOException
writeJSONString in interface org.json.simple.JSONStreamAwarejava.io.IOException