org.axonframework.commandhandling
Class SimpleCommandBusStatistics

java.lang.Object
  extended by org.axonframework.commandhandling.SimpleCommandBusStatistics
All Implemented Interfaces:
SimpleCommandBusStatisticsMXBean

public class SimpleCommandBusStatistics
extends Object
implements SimpleCommandBusStatisticsMXBean

Statistics object to store information about the internals of the SimpleCommandBus.

You can request information about the registered handlers but also about the number of received commands.

Next to requesting information it is also possible to reset the counters

Finally, the statistics are only gathered when explicitly enabled. By default they are switched off.

Since:
0.6
Author:
Jettro Coenradie, Allard Buijze

Constructor Summary
SimpleCommandBusStatistics()
          Creates an instance of this statistics MBean.
 
Method Summary
 long getCommandHandlerCount()
          Returns the amount of registered handlers.
 List<String> getHandlerTypes()
          Returns a list with the names of the types of the registered handlers.
 long getReceivedCommandCount()
          Returns the amount of received commands from the beginning of starting up or after the last reset.
 void resetReceivedCommandsCounter()
          Resets the received command counter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleCommandBusStatistics

public SimpleCommandBusStatistics()
Creates an instance of this statistics MBean.

Method Detail

getCommandHandlerCount

public long getCommandHandlerCount()
Returns the amount of registered handlers.

Specified by:
getCommandHandlerCount in interface SimpleCommandBusStatisticsMXBean
Returns:
long representing the amount of registered handlers

getReceivedCommandCount

public long getReceivedCommandCount()
Returns the amount of received commands from the beginning of starting up or after the last reset.

Specified by:
getReceivedCommandCount in interface SimpleCommandBusStatisticsMXBean
Returns:
long representing the amount of received commands

getHandlerTypes

public List<String> getHandlerTypes()
Returns a list with the names of the types of the registered handlers.

Specified by:
getHandlerTypes in interface SimpleCommandBusStatisticsMXBean
Returns:
List of strings with the names of the registered handlers

resetReceivedCommandsCounter

public void resetReceivedCommandsCounter()
Resets the received command counter.

Specified by:
resetReceivedCommandsCounter in interface SimpleCommandBusStatisticsMXBean


Copyright © 2010-2016. All Rights Reserved.