public void update()

in src/com/vmware/vim/cf/ManagedObjectCache.java [69:119]


    public void update(Observable obj, Object arg)
    {
        if (arg instanceof PropertyFilterUpdate[])
        {
            PropertyFilterUpdate[] pfus = (PropertyFilterUpdate[]) arg;
            
            for(int i=0; pfus!=null && i< pfus.length; i++)
            {
                ObjectUpdate[] ous = pfus[i].getObjectSet();
                for(int j=0; ous!=null && j < ous.length; j++)
                {
                    ManagedObjectReference mor = ous[j].getObj();
                    if(! items.containsKey(mor))
                    {
                        items.put(mor, new ConcurrentHashMap<String, Object>());
                    }
                    Map<String, Object> moMap = items.get(mor);
                    
                    PropertyChange[] pcs = ous[j].getChangeSet();
                    if(pcs==null)
                    {
                      continue;
                    }
                    for(int k=0; k < pcs.length; k++)
                    {
                    	  Object value = pcs[k].getVal();
                    	  value = value == null ? NULL : value; //null is not allowed as value in CHM
                    	  String propName = pcs[k].getName();
                    	  if(moMap.containsKey(propName))
                    	  {
                    	    moMap.put(propName, value);
                    	  }
                    	  else
                    	  {
                    	    String parentPropName = getExistingParentPropName(moMap, propName);
                    	    if(parentPropName != null)
                    	    {
                    	      ManagedObject mo = MorUtil.createExactManagedObject(si.getServerConnection(), mor);
                    	      moMap.put(parentPropName, mo.getPropertyByPath(parentPropName));
                    	    }
                    	    else
                    	    { //almost impossible to be here.
                    	      moMap.put(propName, value);
                    	    }
                    	  }
                    }
                }
            }
        }
        isReady = true;
    }