org.rhq.enterprise.server.remote
Class RemoteSafeInvocationHandlerMetrics

java.lang.Object
  extended by org.rhq.enterprise.server.remote.RemoteSafeInvocationHandlerMetrics
All Implemented Interfaces:
RemoteSafeInvocationHandlerMetricsMBean

public class RemoteSafeInvocationHandlerMetrics
extends Object
implements RemoteSafeInvocationHandlerMetricsMBean

Provides metrics for remote invocations from things like the remote CLI.

Author:
John Mazzitelli

Nested Class Summary
 class RemoteSafeInvocationHandlerMetrics.Calltime
          Used to store the minimum, maximum and average times (in milliseconds) for invocations to a particular invocation.
 
Field Summary
 
Fields inherited from interface org.rhq.enterprise.server.remote.RemoteSafeInvocationHandlerMetricsMBean
OBJECTNAME_METRICS
 
Constructor Summary
RemoteSafeInvocationHandlerMetrics()
           
 
Method Summary
 void clear()
          Clears the metrics data, starting all values back to 0 as if starting fresh.
 long getAverageExecutionTime()
          Returns the average execution time (in milliseconds) it took to execute all successful invocations received.
 Map<String,RemoteSafeInvocationHandlerMetrics.Calltime> getCallTimeData()
          Returns a map of individual invocations and their metrics such as number of times invoked, min/max/avg execution times.
 Map<String,long[]> getCallTimeDataAsPrimitives()
          This obtains the same calltime data as RemoteSafeInvocationHandlerMetricsMBean.getCallTimeData() except the map that is returned contains only primitive objects so remote clients do not have to have this MBean class definition in their classloaders.
 long getNumberFailedInvocations()
          Returns the total number of invocations that were received but failed to be processed succesfully.
 long getNumberSuccessfulInvocations()
          Returns the total number of invocations that were received and processed successfully.
 long getNumberTotalInvocations()
          Returns the sum of all invocations received, successful or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteSafeInvocationHandlerMetrics

public RemoteSafeInvocationHandlerMetrics()
Method Detail

clear

public void clear()
Description copied from interface: RemoteSafeInvocationHandlerMetricsMBean
Clears the metrics data, starting all values back to 0 as if starting fresh.

Specified by:
clear in interface RemoteSafeInvocationHandlerMetricsMBean

getCallTimeData

public Map<String,RemoteSafeInvocationHandlerMetrics.Calltime> getCallTimeData()
Description copied from interface: RemoteSafeInvocationHandlerMetricsMBean
Returns a map of individual invocations and their metrics such as number of times invoked, min/max/avg execution times.

Specified by:
getCallTimeData in interface RemoteSafeInvocationHandlerMetricsMBean
Returns:
calltime data

getCallTimeDataAsPrimitives

public Map<String,long[]> getCallTimeDataAsPrimitives()
Description copied from interface: RemoteSafeInvocationHandlerMetricsMBean
This obtains the same calltime data as RemoteSafeInvocationHandlerMetricsMBean.getCallTimeData() except the map that is returned contains only primitive objects so remote clients do not have to have this MBean class definition in their classloaders. The order of the map values is important - each element in the array is as follows:
  1. count
  2. successes
  3. failures
  4. minimum execution time
  5. maximum execution time
  6. average execution time

Specified by:
getCallTimeDataAsPrimitives in interface RemoteSafeInvocationHandlerMetricsMBean
Returns:
the calltime data stored in a map containing primitive arrays. Keyed on API name.

getNumberFailedInvocations

public long getNumberFailedInvocations()
Description copied from interface: RemoteSafeInvocationHandlerMetricsMBean
Returns the total number of invocations that were received but failed to be processed succesfully.

Specified by:
getNumberFailedInvocations in interface RemoteSafeInvocationHandlerMetricsMBean
Returns:
count of failed invocations

getNumberSuccessfulInvocations

public long getNumberSuccessfulInvocations()
Description copied from interface: RemoteSafeInvocationHandlerMetricsMBean
Returns the total number of invocations that were received and processed successfully.

Specified by:
getNumberSuccessfulInvocations in interface RemoteSafeInvocationHandlerMetricsMBean
Returns:
count of invocations successfully processed

getNumberTotalInvocations

public long getNumberTotalInvocations()
Description copied from interface: RemoteSafeInvocationHandlerMetricsMBean
Returns the sum of all invocations received, successful or not.

Specified by:
getNumberTotalInvocations in interface RemoteSafeInvocationHandlerMetricsMBean
Returns:
total number of invocations received

getAverageExecutionTime

public long getAverageExecutionTime()
Description copied from interface: RemoteSafeInvocationHandlerMetricsMBean
Returns the average execution time (in milliseconds) it took to execute all successful invocations received.

Specified by:
getAverageExecutionTime in interface RemoteSafeInvocationHandlerMetricsMBean
Returns:
average execute time for all successful invocations.


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.