private String calculateRefreshCommand(RefreshCommandConfiguration refreshCommandConfiguration,
                                         ServiceComponentHost sch, List<String> changedProperties) {

    String finalRefreshCommand = null;
    for (String propertyName : changedProperties) {
      String refreshCommand = refreshCommandConfiguration.getRefreshCommandForComponent(sch, propertyName);
      if (refreshCommand == null) {
        return null;
      }
      if (finalRefreshCommand == null) {
        finalRefreshCommand = refreshCommand;
      }
      if (!finalRefreshCommand.equals(refreshCommand)) {
        if (finalRefreshCommand.equals(RefreshCommandConfiguration.REFRESH_CONFIGS)) {
          finalRefreshCommand = refreshCommand;
        } else if (!refreshCommand.equals(RefreshCommandConfiguration.REFRESH_CONFIGS)) {
          return null;
        }
      }
    }
    return finalRefreshCommand;
  }
Calculates refresh command for a set of changed properties as follows:
 - if a property has no refresh command return null
 - in case of multiple refresh commands: as REFRESH_CONFIGS is executed by default in case of any other command as well,
 can be overriden by RELOAD_CONFIGS or any other custom command, however in case of any other different commands return null
 as it's not possible to refresh all properties with one command.

 examples:
    {REFRESH_CONFIGS, REFRESH_CONFIGS, RELOAD_CONFIGS} ==> RELOAD_CONFIGS
    {REFRESH_CONFIGS, RELOADPROXYUSERS, RELOAD_CONFIGS} ==> null

@param refreshCommandConfiguration
@param sch
@param changedProperties
@return
ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java