|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.analytics.MetricsRecord
public class MetricsRecord
This class keeps a back-pointer to the AnalyticsContext
and delegates back to it on update
and remove()
.
Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com ) & Karthik Ranganathan ( kranganathan@facebook.com )
Constructor Summary | |
---|---|
protected |
MetricsRecord(java.lang.String recordName,
AnalyticsContext context)
Creates a new instance of MetricsRecord |
Method Summary | |
---|---|
java.lang.String |
getRecordName()
Returns the record name. |
void |
incrMetric(java.lang.String metricName,
byte metricValue)
Increments the named metric by the specified value. |
void |
incrMetric(java.lang.String metricName,
float metricValue)
Increments the named metric by the specified value. |
void |
incrMetric(java.lang.String metricName,
int metricValue)
Increments the named metric by the specified value. |
void |
incrMetric(java.lang.String metricName,
short metricValue)
Increments the named metric by the specified value. |
void |
remove()
Removes the row, if it exists, in the buffered data table having tags that equal the tags that have been set on this record. |
void |
setMetric(java.lang.String metricName,
byte metricValue)
Sets the named metric to the specified value. |
void |
setMetric(java.lang.String metricName,
float metricValue)
Sets the named metric to the specified value. |
void |
setMetric(java.lang.String metricName,
int metricValue)
Sets the named metric to the specified value. |
void |
setMetric(java.lang.String metricName,
short metricValue)
Sets the named metric to the specified value. |
void |
setTag(java.lang.String tagName,
byte tagValue)
Sets the named tag to the specified value. |
void |
setTag(java.lang.String tagName,
int tagValue)
Sets the named tag to the specified value. |
void |
setTag(java.lang.String tagName,
short tagValue)
Sets the named tag to the specified value. |
void |
setTag(java.lang.String tagName,
java.lang.String tagValue)
Sets the named tag to the specified value. |
void |
update()
Updates the table of buffered data which is to be sent periodically. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected MetricsRecord(java.lang.String recordName, AnalyticsContext context)
recordName
- name of this recordcontext
- the context which this record is a part ofMethod Detail |
---|
public java.lang.String getRecordName()
public void setTag(java.lang.String tagName, java.lang.String tagValue)
tagName
- name of the tagtagValue
- new value of the tag
MetricsException
- if the tagName conflicts with the configurationpublic void setTag(java.lang.String tagName, int tagValue)
tagName
- name of the tagtagValue
- new value of the tag
MetricsException
- if the tagName conflicts with the configurationpublic void setTag(java.lang.String tagName, short tagValue)
tagName
- name of the tagtagValue
- new value of the tag
MetricsException
- if the tagName conflicts with the configurationpublic void setTag(java.lang.String tagName, byte tagValue)
tagName
- name of the tagtagValue
- new value of the tag
MetricsException
- if the tagName conflicts with the configurationpublic void setMetric(java.lang.String metricName, int metricValue)
metricName
- name of the metricmetricValue
- new value of the metric
MetricsException
- if the metricName or the type of the metricValue
conflicts with the configurationpublic void setMetric(java.lang.String metricName, short metricValue)
metricName
- name of the metricmetricValue
- new value of the metric
MetricsException
- if the metricName or the type of the metricValue
conflicts with the configurationpublic void setMetric(java.lang.String metricName, byte metricValue)
metricName
- name of the metricmetricValue
- new value of the metric
MetricsException
- if the metricName or the type of the metricValue
conflicts with the configurationpublic void setMetric(java.lang.String metricName, float metricValue)
metricName
- name of the metricmetricValue
- new value of the metric
MetricsException
- if the metricName or the type of the metricValue
conflicts with the configurationpublic void incrMetric(java.lang.String metricName, int metricValue)
metricName
- name of the metricmetricValue
- incremental value
MetricsException
- if the metricName or the type of the metricValue
conflicts with the configurationpublic void incrMetric(java.lang.String metricName, short metricValue)
metricName
- name of the metricmetricValue
- incremental value
MetricsException
- if the metricName or the type of the metricValue
conflicts with the configurationpublic void incrMetric(java.lang.String metricName, byte metricValue)
metricName
- name of the metricmetricValue
- incremental value
MetricsException
- if the metricName or the type of the metricValue
conflicts with the configurationpublic void incrMetric(java.lang.String metricName, float metricValue)
metricName
- name of the metricmetricValue
- incremental value
MetricsException
- if the metricName or the type of the metricValue
conflicts with the configurationpublic void update()
public void remove()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |