|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.metrics.codahale_metrics.metrics.core.MetricName
public class MetricName
A value class encapsulating a metric's owning class and name.
Constructor Summary | |
---|---|
MetricName(java.lang.Class<?> klass,
java.lang.String name)
Creates a new MetricName without a scope. |
|
MetricName(java.lang.Class<?> klass,
java.lang.String name,
java.lang.String scope)
Creates a new MetricName without a scope. |
|
MetricName(java.lang.String group,
java.lang.String type,
java.lang.String name)
Creates a new MetricName without a scope. |
|
MetricName(java.lang.String group,
java.lang.String type,
java.lang.String name,
java.lang.String scope)
Creates a new MetricName without a scope. |
|
MetricName(java.lang.String group,
java.lang.String type,
java.lang.String name,
java.lang.String scope,
java.lang.String mBeanName)
Creates a new MetricName without a scope. |
Method Summary | |
---|---|
static java.lang.String |
chooseGroup(java.lang.String group,
java.lang.Class<?> klass)
If the group is empty, use the package name of the given class. |
static java.lang.String |
chooseName(java.lang.String name,
java.lang.reflect.Method method)
If name is empty, use the name of the given method. |
static java.lang.String |
chooseType(java.lang.String type,
java.lang.Class<?> klass)
If the type is empty, use the simple name of the given class. |
int |
compareTo(MetricName o)
|
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getGroup()
Returns the group to which the Metric belongs. |
java.lang.String |
getMBeanName()
Returns the MBean name for the Metric identified by this metric name. |
java.lang.String |
getName()
Returns the name of the Metric . |
java.lang.String |
getScope()
Returns the scope of the Metric . |
java.lang.String |
getType()
Returns the type to which the Metric belongs. |
int |
hashCode()
|
boolean |
hasScope()
Returns true if the Metric has a scope, false otherwise. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MetricName(java.lang.Class<?> klass, java.lang.String name)
MetricName
without a scope.
klass
- the Class
to which the Metric
belongsname
- the name of the Metric
public MetricName(java.lang.String group, java.lang.String type, java.lang.String name)
MetricName
without a scope.
group
- the group to which the Metric
belongstype
- the type to which the Metric
belongsname
- the name of the Metric
public MetricName(java.lang.Class<?> klass, java.lang.String name, java.lang.String scope)
MetricName
without a scope.
klass
- the Class
to which the Metric
belongsname
- the name of the Metric
scope
- the scope of the Metric
public MetricName(java.lang.String group, java.lang.String type, java.lang.String name, java.lang.String scope)
MetricName
without a scope.
group
- the group to which the Metric
belongstype
- the type to which the Metric
belongsname
- the name of the Metric
scope
- the scope of the Metric
public MetricName(java.lang.String group, java.lang.String type, java.lang.String name, java.lang.String scope, java.lang.String mBeanName)
MetricName
without a scope.
group
- the group to which the Metric
belongstype
- the type to which the Metric
belongsname
- the name of the Metric
scope
- the scope of the Metric
mBeanName
- the 'ObjectName', represented as a string, to use when registering the
MBean.Method Detail |
---|
public java.lang.String getGroup()
Metric
belongs. For class-based metrics, this will be
the package name of the Class
to which the Metric
belongs.
Metric
belongspublic java.lang.String getType()
Metric
belongs. For class-based metrics, this will be
the simple class name of the Class
to which the Metric
belongs.
Metric
belongspublic java.lang.String getName()
Metric
.
Metric
public java.lang.String getScope()
Metric
.
Metric
public boolean hasScope()
true
if the Metric
has a scope, false
otherwise.
true
if the Metric
has a scopepublic java.lang.String getMBeanName()
Metric
identified by this metric name.
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(MetricName o)
compareTo
in interface java.lang.Comparable<MetricName>
public static java.lang.String chooseGroup(java.lang.String group, java.lang.Class<?> klass)
group
- The group to use by defaultklass
- The class being tracked
public static java.lang.String chooseType(java.lang.String type, java.lang.Class<?> klass)
type
- The type to use by defaultklass
- The class being tracked
public static java.lang.String chooseName(java.lang.String name, java.lang.reflect.Method method)
name
- The name to use by defaultmethod
- The method being tracked
|
© 2006-2016 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |