jdk/src/share/classes/javax/management/relation/RelationService.java
changeset 1004 5ba8217eb504
parent 715 f16baef3a20e
child 1510 e747d3193ef2
equal deleted inserted replaced
1003:b2f6b7e00c29 1004:5ba8217eb504
   106     // Map associating:
   106     // Map associating:
   107     //       <ObjectName> -> HashMap
   107     //       <ObjectName> -> HashMap
   108     // the value HashMap mapping:
   108     // the value HashMap mapping:
   109     //       <relation id> -> ArrayList of <role name>
   109     //       <relation id> -> ArrayList of <role name>
   110     // to track where a given MBean is referenced.
   110     // to track where a given MBean is referenced.
   111     private Map<ObjectName,Map<String,List<String>>>
   111     private final Map<ObjectName,Map<String,List<String>>>
   112         myRefedMBeanObjName2RelIdsMap =
   112         myRefedMBeanObjName2RelIdsMap =
   113             new HashMap<ObjectName,Map<String,List<String>>>();
   113             new HashMap<ObjectName,Map<String,List<String>>>();
   114 
   114 
   115     // Flag to indicate if, when a notification is received for the
   115     // Flag to indicate if, when a notification is received for the
   116     // unregistration of an MBean referenced in a relation, if an immediate
   116     // unregistration of an MBean referenced in a relation, if an immediate
  1490 
  1490 
  1491 
  1491 
  1492         // Clones the list of notifications to be able to still receive new
  1492         // Clones the list of notifications to be able to still receive new
  1493         // notifications while proceeding those ones
  1493         // notifications while proceeding those ones
  1494         List<MBeanServerNotification> localUnregNtfList;
  1494         List<MBeanServerNotification> localUnregNtfList;
  1495         synchronized(myUnregNtfList) {
  1495         synchronized(myRefedMBeanObjName2RelIdsMap) {
  1496             localUnregNtfList =
  1496             localUnregNtfList =
  1497                 new ArrayList<MBeanServerNotification>(myUnregNtfList);
  1497                 new ArrayList<MBeanServerNotification>(myUnregNtfList);
  1498             // Resets list
  1498             // Resets list
  1499             myUnregNtfList = new ArrayList<MBeanServerNotification>();
  1499             myUnregNtfList = new ArrayList<MBeanServerNotification>();
  1500         }
  1500         }