private Map < SessionStatus , MetricsTimeVaryingInt > createSessionStatusToMetricsMap ( ) { Map < SessionStatus , MetricsTimeVaryingInt > m = new HashMap < SessionStatus , MetricsTimeVaryingInt > ( ) ; for ( SessionStatus endState : SESSION_END_STATES ) { String name = endState . toString ( ) . toLowerCase ( ) + "_sessions" ; m . put ( endState , new MetricsTimeVaryingInt ( name , registry ) ) ; } return m ; }
Create a map of session status - > metrics .