mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-17 02:11:38 +02:00
Minor cleanup in the Metrics module:
* Add missing Javadoc * Line formatting No functional changes.
This commit is contained in:
parent
c1c056b471
commit
df042bd11d
@ -24,14 +24,17 @@ public class MetricsComponent implements MetricsComponentRegistry {
|
||||
name = newName;
|
||||
}
|
||||
|
||||
@Override public String getName() {
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override public MetricsFeature registerFeature(final String featureName) {
|
||||
@Override
|
||||
public MetricsFeature registerFeature(final String featureName) {
|
||||
MetricsFeature feature = featuresRegistry.get(featureName);
|
||||
if (feature == null) {
|
||||
final MetricsFeature createdFeature = new MetricsFeature(featureName);
|
||||
final MetricsFeature createdFeature =
|
||||
new MetricsFeature(featureName);
|
||||
feature = featuresRegistry.putIfAbsent(featureName, createdFeature);
|
||||
if (feature == null) {
|
||||
feature = createdFeature;
|
||||
|
@ -4,7 +4,18 @@ package org.onlab.metrics;
|
||||
* Registry Entry for Metrics Components.
|
||||
*/
|
||||
public interface MetricsComponentRegistry {
|
||||
/**
|
||||
* Fetches the name of the Component.
|
||||
*
|
||||
* @return name of the Component
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Registers a Feature for this component.
|
||||
*
|
||||
* @param featureName name of the Feature to register
|
||||
* @return Feature object that can be used when creating Metrics
|
||||
*/
|
||||
MetricsFeature registerFeature(String featureName);
|
||||
}
|
||||
|
@ -15,6 +15,11 @@ public class MetricsFeature {
|
||||
name = newName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the name of the Feature.
|
||||
*
|
||||
* @return name of the Feature
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user