src/share/classes/com/sun/corba/se/impl/monitoring/MonitoringManagerFactoryImpl.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 32,47 ****
public class MonitoringManagerFactoryImpl implements MonitoringManagerFactory {
private HashMap monitoringManagerTable = new HashMap();
public synchronized MonitoringManager createMonitoringManager(
! String nameOfTheRoot, String description )
{
MonitoringManagerImpl m = null;
m = (MonitoringManagerImpl)monitoringManagerTable.get(nameOfTheRoot);
if (m == null) {
! m = new MonitoringManagerImpl( nameOfTheRoot, description );
monitoringManagerTable.put(nameOfTheRoot, m);
}
return m;
}
}
--- 32,51 ----
public class MonitoringManagerFactoryImpl implements MonitoringManagerFactory {
private HashMap monitoringManagerTable = new HashMap();
public synchronized MonitoringManager createMonitoringManager(
! String nameOfTheRoot, String description)
{
MonitoringManagerImpl m = null;
m = (MonitoringManagerImpl)monitoringManagerTable.get(nameOfTheRoot);
if (m == null) {
! m = new MonitoringManagerImpl(nameOfTheRoot, description);
monitoringManagerTable.put(nameOfTheRoot, m);
}
return m;
}
+
+ public synchronized void remove(String nameOfTheRoot) {
+ monitoringManagerTable.remove(nameOfTheRoot);
+ }
}