code: public void addInstance(InstanceInfo i) {
          instancesMap.put(i.getId(), i);
          synchronized (instances) {
              instances.remove(i);
              instances.add(i);
              isDirty = true;
          }
      }
docs: Add the given instance info the list.
  
  @param i
  the instance info object to be added.