org.rhq.enterprise.communications
Class ServiceContainerMetrics

java.lang.Object
  extended by org.rhq.enterprise.communications.ServiceContainerMetrics
All Implemented Interfaces:
ServiceContainerMetricsMBean

public class ServiceContainerMetrics
extends Object
implements ServiceContainerMetricsMBean

MBean implementation that emits metrics from the server-side comm components.


Field Summary
 
Fields inherited from interface org.rhq.enterprise.communications.ServiceContainerMetricsMBean
OBJECTNAME_METRICS
 
Constructor Summary
ServiceContainerMetrics(ServiceContainer service_container, CommandProcessor command_processor)
          Creates a new ServiceContainerMetrics object.
 
Method Summary
 void clear()
          Clears the metrics data, starting all values back to 0 as if starting fresh.
 long getAverageExecutionTimeReceived()
          Returns the average execution time (in milliseconds) it took to execute all successful commands received.
 Map<String,CommandProcessorMetrics.Calltime> getCallTimeDataReceived()
          Returns a map of individual command types/pojo invocations and their metrics such as number of times invoked, min/max/avg execution times.
 long getNumberDroppedCommandsReceived()
          Returns the total number of commands that were received but were dropped, usually due to a limit reached in the server that prohibits more commands to be invoked until current invocations finish.
 long getNumberFailedCommandsReceived()
          Returns the total number of commands that were received but failed to be processed succesfully.
 long getNumberNotProcessedCommandsReceived()
          Returns the total number of commands that were received but were not processed, usually due to global suspension of command processing.
 long getNumberSuccessfulCommandsReceived()
          Returns the total number of commands that were received and processed successfully.
 long getNumberTotalCommandsReceived()
          Returns the sum of all commands received, successful or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceContainerMetrics

public ServiceContainerMetrics(ServiceContainer service_container,
                               CommandProcessor command_processor)
Creates a new ServiceContainerMetrics object.

Parameters:
service_container - the service container that houses the command processor
command_processor - the actual command process object that receives commands emits the metrics
Method Detail

clear

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

Specified by:
clear in interface ServiceContainerMetricsMBean

getNumberSuccessfulCommandsReceived

public long getNumberSuccessfulCommandsReceived()
Description copied from interface: ServiceContainerMetricsMBean
Returns the total number of commands that were received and processed successfully.

Specified by:
getNumberSuccessfulCommandsReceived in interface ServiceContainerMetricsMBean
Returns:
count of commands successfully processed
See Also:
CommandProcessorMetrics.getNumberSuccessfulCommands()

getNumberFailedCommandsReceived

public long getNumberFailedCommandsReceived()
Description copied from interface: ServiceContainerMetricsMBean
Returns the total number of commands that were received but failed to be processed succesfully. This does not count dropped or unprocessed commands.

Specified by:
getNumberFailedCommandsReceived in interface ServiceContainerMetricsMBean
Returns:
count of failed commands
See Also:
CommandProcessorMetrics.getNumberFailedCommands()

getNumberDroppedCommandsReceived

public long getNumberDroppedCommandsReceived()
Description copied from interface: ServiceContainerMetricsMBean
Returns the total number of commands that were received but were dropped, usually due to a limit reached in the server that prohibits more commands to be invoked until current invocations finish.

Specified by:
getNumberDroppedCommandsReceived in interface ServiceContainerMetricsMBean
Returns:
count of dropped commands
See Also:
CommandProcessorMetrics.getNumberDroppedCommands()

getNumberNotProcessedCommandsReceived

public long getNumberNotProcessedCommandsReceived()
Description copied from interface: ServiceContainerMetricsMBean
Returns the total number of commands that were received but were not processed, usually due to global suspension of command processing.

Specified by:
getNumberNotProcessedCommandsReceived in interface ServiceContainerMetricsMBean
Returns:
count of dropped commands
See Also:
CommandProcessorMetrics.getNumberNotProcessedCommands()

getNumberTotalCommandsReceived

public long getNumberTotalCommandsReceived()
Description copied from interface: ServiceContainerMetricsMBean
Returns the sum of all commands received, successful or not.

Specified by:
getNumberTotalCommandsReceived in interface ServiceContainerMetricsMBean
Returns:
total number of commands received

getAverageExecutionTimeReceived

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

Specified by:
getAverageExecutionTimeReceived in interface ServiceContainerMetricsMBean
Returns:
average execute time for all successful commands.
See Also:
CommandProcessorMetrics.getAverageExecutionTime()

getCallTimeDataReceived

public Map<String,CommandProcessorMetrics.Calltime> getCallTimeDataReceived()
Description copied from interface: ServiceContainerMetricsMBean
Returns a map of individual command types/pojo invocations and their metrics such as number of times invoked, min/max/avg execution times.

Specified by:
getCallTimeDataReceived in interface ServiceContainerMetricsMBean
Returns:
calltime data
See Also:
CommandProcessorMetrics#getCallTimeDataReceived()


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