public static void visitStatistics ( @ Nonnull final IStatisticsVisitorCallback aCallback ) { ValueEnforcer . notNull ( aCallback , "Callback" ) ; // For all cache handler ICommonsList < String > aHandlers = StatisticsManager . getAllCacheHandler ( ) . getSorted ( Comparator . naturalOrder ( ) ) ; for ( final String sName : aHandlers ) { final IStatisticsHandlerCache aHandler = StatisticsManager . getCacheHandler ( sName ) ; aCallback . onCache ( sName , aHandler ) ; } // For all timer handler aHandlers = StatisticsManager . getAllTimerHandler ( ) . getSorted ( Comparator . naturalOrder ( ) ) ; for ( final String sName : aHandlers ) { final IStatisticsHandlerTimer aHandler = StatisticsManager . getTimerHandler ( sName ) ; aCallback . onTimer ( sName , aHandler ) ; } // For all keyed timer handler aHandlers = StatisticsManager . getAllKeyedTimerHandler ( ) . getSorted ( Comparator . naturalOrder ( ) ) ; for ( final String sName : aHandlers ) { final IStatisticsHandlerKeyedTimer aHandler = StatisticsManager . getKeyedTimerHandler ( sName ) ; aCallback . onKeyedTimer ( sName , aHandler ) ; } // For all size handler aHandlers = StatisticsManager . getAllSizeHandler ( ) . getSorted ( Comparator . naturalOrder ( ) ) ; for ( final String sName : aHandlers ) { final IStatisticsHandlerSize aHandler = StatisticsManager . getSizeHandler ( sName ) ; aCallback . onSize ( sName , aHandler ) ; } // For all keyed size handler aHandlers = StatisticsManager . getAllKeyedSizeHandler ( ) . getSorted ( Comparator . naturalOrder ( ) ) ; for ( final String sName : aHandlers ) { final IStatisticsHandlerKeyedSize aHandler = StatisticsManager . getKeyedSizeHandler ( sName ) ; aCallback . onKeyedSize ( sName , aHandler ) ; } // For all counter handler aHandlers = StatisticsManager . getAllCounterHandler ( ) . getSorted ( Comparator . naturalOrder ( ) ) ; for ( final String sName : aHandlers ) { final IStatisticsHandlerCounter aHandler = StatisticsManager . getCounterHandler ( sName ) ; aCallback . onCounter ( sName , aHandler ) ; } // For all keyed counter handler aHandlers = StatisticsManager . getAllKeyedCounterHandler ( ) . getSorted ( Comparator . naturalOrder ( ) ) ; for ( final String sName : aHandlers ) { final IStatisticsHandlerKeyedCounter aHandler = StatisticsManager . getKeyedCounterHandler ( sName ) ; aCallback . onKeyedCounter ( sName , aHandler ) ; } }
Walk all available statistics elements with the passed statistics visitor .