class KieWatcher {

  public void refreshConfigItems(Map<String, Object> remoteItems) {
    String md5Vaule = KieUtil.encrypt(remoteItems.toString());
    if (CollectionUtils.isEmpty(remoteItems)) {
      updateHandler.handle("delete", lastTimeData);
      lastTimeData = remoteItems;
      return;
    }
    if (StringUtils.isEmpty(refreshRecord)) {
      refreshRecord = md5Vaule;
      updateHandler.handle("create", remoteItems);
      lastTimeData = remoteItems;
      return;
    }
    if (md5Vaule.equals(refreshRecord)) {
      return;
    }
    refreshRecord = md5Vaule;
    doRefresh(remoteItems);
    lastTimeData = remoteItems;
  }

  private  KieWatcher();

}