private String buildMetricName ( String process , String mbeanName , String mbeanPublishName , String attribute , String attrPublishName ) { StringBuilder buf = new StringBuilder ( ) ; if ( process != null ) { buf . append ( process ) ; buf . append ( "_" ) ; } if ( mbeanPublishName != null ) { buf . append ( mbeanPublishName ) ; } else { buf . append ( mbeanName ) ; } buf . append ( "_" ) ; if ( ! "" . equals ( attrPublishName ) ) { buf . append ( attrPublishName ) ; } else { buf . append ( attribute ) ; } return buf . toString ( ) ; }
Builds the metric name in ganglia