public void putStats ( String route , String cause ) { if ( route == null ) route = "UNKNOWN_ROUTE" ; route = route . replace ( "/" , "_" ) ; ConcurrentHashMap < String , ErrorStatsData > statsMap = routeMap . get ( route ) ; if ( statsMap == null ) { statsMap = new ConcurrentHashMap < String , ErrorStatsData > ( ) ; routeMap . putIfAbsent ( route , statsMap ) ; } ErrorStatsData sd = statsMap . get ( cause ) ; if ( sd == null ) { sd = new ErrorStatsData ( route , cause ) ; ErrorStatsData sd1 = statsMap . putIfAbsent ( cause , sd ) ; if ( sd1 != null ) { sd = sd1 ; } else { MonitorRegistry . getInstance ( ) . registerObject ( sd ) ; } } sd . update ( ) ; }
updates count for the given route and error cause