org.axonframework.eventhandling
Class SimpleEventBusStatistics

java.lang.Object
  extended by org.axonframework.eventhandling.SimpleEventBusStatistics
All Implemented Interfaces:
SimpleEventBusStatisticsMXBean

public class SimpleEventBusStatistics
extends Object
implements SimpleEventBusStatisticsMXBean

Statistics object to store information about the internal of the SimpleEventBus.

You can request information about the registered listeners but also about the number of received events.

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
See Also:
SimpleEventBus

Method Summary
 long getListenerCount()
          Returns the amount of registered listeners.
 List<String> getListenerTypes()
          Returns the list of names of the registered listeners.
 long getReceivedEventsCount()
          Returns the amount of received events, from the beginning or after the last reset.
 void resetReceivedEventsCount()
          Reset the amount of events that was received.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getListenerCount

public long getListenerCount()
Returns the amount of registered listeners.

Specified by:
getListenerCount in interface SimpleEventBusStatisticsMXBean
Returns:
long representing the amount of listeners registered

getReceivedEventsCount

public long getReceivedEventsCount()
Returns the amount of received events, from the beginning or after the last reset.

Specified by:
getReceivedEventsCount in interface SimpleEventBusStatisticsMXBean
Returns:
long representing the amount events received

resetReceivedEventsCount

public void resetReceivedEventsCount()
Reset the amount of events that was received.

Specified by:
resetReceivedEventsCount in interface SimpleEventBusStatisticsMXBean

getListenerTypes

public List<String> getListenerTypes()
Returns the list of names of the registered listeners.

Specified by:
getListenerTypes in interface SimpleEventBusStatisticsMXBean
Returns:
List of strings representing the names of the registered listeners


Copyright © 2010-2016. All Rights Reserved.