|
@@ -57,6 +57,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
*
|
|
|
* @return the record name
|
|
|
*/
|
|
|
+ @Override
|
|
|
public String getRecordName() {
|
|
|
return recordName;
|
|
|
}
|
|
@@ -68,6 +69,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
* @param tagValue new value of the tag
|
|
|
* @throws MetricsException if the tagName conflicts with the configuration
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void setTag(String tagName, String tagValue) {
|
|
|
if (tagValue == null) {
|
|
|
tagValue = "";
|
|
@@ -82,6 +84,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
* @param tagValue new value of the tag
|
|
|
* @throws MetricsException if the tagName conflicts with the configuration
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void setTag(String tagName, int tagValue) {
|
|
|
tagTable.put(tagName, Integer.valueOf(tagValue));
|
|
|
}
|
|
@@ -93,6 +96,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
* @param tagValue new value of the tag
|
|
|
* @throws MetricsException if the tagName conflicts with the configuration
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void setTag(String tagName, long tagValue) {
|
|
|
tagTable.put(tagName, Long.valueOf(tagValue));
|
|
|
}
|
|
@@ -104,6 +108,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
* @param tagValue new value of the tag
|
|
|
* @throws MetricsException if the tagName conflicts with the configuration
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void setTag(String tagName, short tagValue) {
|
|
|
tagTable.put(tagName, Short.valueOf(tagValue));
|
|
|
}
|
|
@@ -115,6 +120,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
* @param tagValue new value of the tag
|
|
|
* @throws MetricsException if the tagName conflicts with the configuration
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void setTag(String tagName, byte tagValue) {
|
|
|
tagTable.put(tagName, Byte.valueOf(tagValue));
|
|
|
}
|
|
@@ -122,6 +128,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
/**
|
|
|
* Removes any tag of the specified name.
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void removeTag(String tagName) {
|
|
|
tagTable.remove(tagName);
|
|
|
}
|
|
@@ -134,6 +141,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
* @throws MetricsException if the metricName or the type of the metricValue
|
|
|
* conflicts with the configuration
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void setMetric(String metricName, int metricValue) {
|
|
|
setAbsolute(metricName, Integer.valueOf(metricValue));
|
|
|
}
|
|
@@ -146,6 +154,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
* @throws MetricsException if the metricName or the type of the metricValue
|
|
|
* conflicts with the configuration
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void setMetric(String metricName, long metricValue) {
|
|
|
setAbsolute(metricName, Long.valueOf(metricValue));
|
|
|
}
|
|
@@ -158,6 +167,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
* @throws MetricsException if the metricName or the type of the metricValue
|
|
|
* conflicts with the configuration
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void setMetric(String metricName, short metricValue) {
|
|
|
setAbsolute(metricName, Short.valueOf(metricValue));
|
|
|
}
|
|
@@ -170,6 +180,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
* @throws MetricsException if the metricName or the type of the metricValue
|
|
|
* conflicts with the configuration
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void setMetric(String metricName, byte metricValue) {
|
|
|
setAbsolute(metricName, Byte.valueOf(metricValue));
|
|
|
}
|
|
@@ -182,6 +193,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
* @throws MetricsException if the metricName or the type of the metricValue
|
|
|
* conflicts with the configuration
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void setMetric(String metricName, float metricValue) {
|
|
|
setAbsolute(metricName, new Float(metricValue));
|
|
|
}
|
|
@@ -194,6 +206,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
* @throws MetricsException if the metricName or the type of the metricValue
|
|
|
* conflicts with the configuration
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void incrMetric(String metricName, int metricValue) {
|
|
|
setIncrement(metricName, Integer.valueOf(metricValue));
|
|
|
}
|
|
@@ -206,6 +219,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
* @throws MetricsException if the metricName or the type of the metricValue
|
|
|
* conflicts with the configuration
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void incrMetric(String metricName, long metricValue) {
|
|
|
setIncrement(metricName, Long.valueOf(metricValue));
|
|
|
}
|
|
@@ -218,6 +232,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
* @throws MetricsException if the metricName or the type of the metricValue
|
|
|
* conflicts with the configuration
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void incrMetric(String metricName, short metricValue) {
|
|
|
setIncrement(metricName, Short.valueOf(metricValue));
|
|
|
}
|
|
@@ -230,6 +245,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
* @throws MetricsException if the metricName or the type of the metricValue
|
|
|
* conflicts with the configuration
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void incrMetric(String metricName, byte metricValue) {
|
|
|
setIncrement(metricName, Byte.valueOf(metricValue));
|
|
|
}
|
|
@@ -242,6 +258,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
* @throws MetricsException if the metricName or the type of the metricValue
|
|
|
* conflicts with the configuration
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void incrMetric(String metricName, float metricValue) {
|
|
|
setIncrement(metricName, new Float(metricValue));
|
|
|
}
|
|
@@ -259,6 +276,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
* If the tag values match an existing row, that row is updated;
|
|
|
* otherwise, a new row is added.
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void update() {
|
|
|
context.update(this);
|
|
|
}
|
|
@@ -267,6 +285,7 @@ public class MetricsRecordImpl implements MetricsRecord {
|
|
|
* Removes the row, if it exists, in the buffered data table having tags
|
|
|
* that equal the tags that have been set on this record.
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void remove() {
|
|
|
context.remove(this);
|
|
|
}
|