docs: public void addInstance(InstanceInfo i) {
          instancesMap.put(i.getId(), i);
          synchronized (instances) {
              instances.remove(i);
              instances.add(i);
              isDirty = true;
          }
      }