|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hivemind.management.mbeans.AbstractDynamicMBean
org.apache.hivemind.management.mbeans.PerformanceMonitorMBean
public class PerformanceMonitorMBean
MBean that holds and calculates the performance data for service method calls intercepted by the
performanceMonitor
interceptor. Creates for each intercepted method 5 MBean attributes: Number of Calls, Minimum,
maximum, average and last execution time
| Field Summary | |
|---|---|
protected static java.lang.String |
DATA_TYPE_AVERAGE_TIME
|
protected static java.lang.String |
DATA_TYPE_COUNT
|
protected static java.lang.String |
DATA_TYPE_LAST_TIME
|
protected static java.lang.String |
DATA_TYPE_MAXIMUM_TIME
|
protected static java.lang.String |
DATA_TYPE_MINIMUM_TIME
|
| Constructor Summary | |
|---|---|
PerformanceMonitorMBean(java.util.Set methods)
Creates a new instance |
|
| Method Summary | |
|---|---|
void |
addMeasurement(org.apache.hivemind.service.MethodSignature method,
long executionTime)
Adds the measurement of a method execution |
protected java.lang.String |
buildAttributeName(org.apache.hivemind.service.MethodSignature method,
java.lang.String performanceDataType)
Builds the attribute name that holds the measurement data of type performanceDataType for the method. |
protected java.lang.String |
buildAttributeNameDefensive(org.apache.hivemind.service.MethodSignature method,
java.lang.String performanceDataType)
Builds the attribute name that holds the measurement data of type. |
protected javax.management.MBeanAttributeInfo[] |
createMBeanAttributeInfo()
Provides the info which attributes the MBean has. |
java.lang.Object |
getAttribute(java.lang.String attribute)
|
protected void |
initAttributes(java.util.List mBeanAttributeInfoList,
org.apache.hivemind.management.mbeans.Counter counter,
org.apache.hivemind.service.MethodSignature method)
Creates for a intercepted method 5 MBean attributes: Number of Calls, Minimum, maximum, average and last execution time |
protected void |
initCounters()
Builds two maps for accessing the counters by method signature and method id |
| Methods inherited from class org.apache.hivemind.management.mbeans.AbstractDynamicMBean |
|---|
createMBeanConstructorInfo, createMBeanNotificationInfo, createMBeanOperationInfo, getAttributes, getMBeanClassName, getMBeanDescription, getMBeanInfo, getMBeanServer, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setMBeanInfo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String DATA_TYPE_MAXIMUM_TIME
protected static final java.lang.String DATA_TYPE_MINIMUM_TIME
protected static final java.lang.String DATA_TYPE_LAST_TIME
protected static final java.lang.String DATA_TYPE_AVERAGE_TIME
protected static final java.lang.String DATA_TYPE_COUNT
| Constructor Detail |
|---|
public PerformanceMonitorMBean(java.util.Set methods)
methods - Set with instances of MethodSignature.
Contains the methods for that calls can be counted by this MBean| Method Detail |
|---|
protected void initCounters()
protected void initAttributes(java.util.List mBeanAttributeInfoList,
org.apache.hivemind.management.mbeans.Counter counter,
org.apache.hivemind.service.MethodSignature method)
protected java.lang.String buildAttributeName(org.apache.hivemind.service.MethodSignature method,
java.lang.String performanceDataType)
performanceDataType for the method.
protected java.lang.String buildAttributeNameDefensive(org.apache.hivemind.service.MethodSignature method,
java.lang.String performanceDataType)
performanceDataType for the method.
Some jmx implementations (jboss 3.2.7) don't accept spaces and braces in attribute names.
Unlike buildAttributeName(MethodSignature, String) this method doesn't
use chars that are not accepted by Character.isJavaIdentifierPart(char).
public void addMeasurement(org.apache.hivemind.service.MethodSignature method,
long executionTime)
PerformanceCollector
addMeasurement in interface PerformanceCollectormethod - the executed methodexecutionTime - the duration of the method executionPerformanceCollector.addMeasurement(MethodSignature, long)protected javax.management.MBeanAttributeInfo[] createMBeanAttributeInfo()
AbstractDynamicMBean
createMBeanAttributeInfo in class AbstractDynamicMBean
public java.lang.Object getAttribute(java.lang.String attribute)
throws javax.management.AttributeNotFoundException,
javax.management.MBeanException,
javax.management.ReflectionException
getAttribute in interface javax.management.DynamicMBeangetAttribute in class AbstractDynamicMBeanjavax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionExceptionAbstractDynamicMBean.getAttribute(java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||