private Invoker exceptionMetered ( Invoker invoker , List < Method > meteredMethods ) { ImmutableMap . Builder < String , InstrumentedInvokers . ExceptionMeter > meters = new ImmutableMap . Builder <> ( ) ; for ( Method m : meteredMethods ) { ExceptionMetered annotation = m . getAnnotation ( ExceptionMetered . class ) ; final String name = chooseName ( annotation . name ( ) , annotation . absolute ( ) , m , ExceptionMetered . DEFAULT_NAME_SUFFIX ) ; Meter meter = metricRegistry . meter ( name ) ; meters . put ( m . getName ( ) , new InstrumentedInvokers . ExceptionMeter ( meter , annotation . cause ( ) ) ) ; } return new InstrumentedInvokers . ExceptionMeteredInvoker ( invoker , meters . build ( ) ) ; }
Factory method for ExceptionMeteredInvoker .