Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
pankaj
2014-10-02 15:17:11 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e138e27e2a3804a36d93f774fadde5876b2109f7
e138e27e
1 parent
26edf05d
cleanup the constructors
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
utils/misc/src/main/java/org/onlab/metrics/MetricsManager.java
utils/misc/src/main/java/org/onlab/metrics/MetricsManager.java
View file @
e138e27
package
org
.
onlab
.
metrics
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentMap
;
import
com.codahale.metrics.Counter
;
...
...
@@ -50,19 +49,18 @@ public final class MetricsManager implements MetricsService {
/**
* Registry to hold the Components defined in the system.
*/
private
ConcurrentMap
<
String
,
MetricsComponent
>
componentsRegistry
=
new
ConcurrentHashMap
<>();
private
ConcurrentMap
<
String
,
MetricsComponent
>
componentsRegistry
;
/**
* Registry for the Metrics objects created in the system.
*/
private
final
MetricRegistry
metricsRegistry
=
new
MetricRegistry
();
/**
* Hide constructor. The only way to get the registry is through the
* singleton getter.
*/
private
MetricsManager
()
{
}
public
MetricsManager
(
ConcurrentMap
<
String
,
MetricsComponent
>
componentsRegistry
)
{
this
.
componentsRegistry
=
componentsRegistry
;
}
/**
* Registers a component.
...
...
Please
register
or
login
to post a comment