@@ -0,0 +1,1052 @@
+package com.linkedin.clustermanager.controller;%0A%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.TreeMap;%0A%0Aimport com.linkedin.clustermanager.core.ClusterDataAccessor.InstanceConfigProperty;%0Aimport com.linkedin.clustermanager.model.ZNRecord;%0A%0Apublic class InstanceConfigHolder%0A%7B%0A  private List%3CZNRecord%3E _instanceConfigList;%0A  %0A  private Map%3CString, Boolean%3E _instanceEnabledMap = new TreeMap%3CString, Boolean%3E();%0A%0A  public void refresh(List%3CZNRecord%3E instanceConfigs)%0A  %7B%0A    _instanceConfigList = instanceConfigs;%0A    updateEnableMap();%0A  %7D%0A  %0A  void updateEnableMap()%0A  %7B%0A    _instanceEnabledMap.clear();%0A    for(ZNRecord config : _instanceConfigList)%0A    %7B%0A      boolean enabled = Boolean.parseBoolean(config.getSimpleField(InstanceConfigProperty.ENABLED.toString()));%0A      _instanceEnabledMap.put(config.getId(), enabled);%0A    %7D%0A  %7D%0A%0A  public boolean isEnabled(String instanceName)%0A  %7B%0A    if (!_instanceEnabledMap.containsKey(instanceName))%0A    %7B%0A        return false;%0A    %7D%0A    return _instanceEnabledMap.get(instanceName); %0A  %7D%0A%7D%0A

Add instanceHolder class to keep the enabled / disabled instances