break;
}
}
if (!contains) {
HostComponentConfigMappingEntity newEntity =
new HostComponentConfigMappingEntity();
newEntity.setClusterId(stateEntity.getClusterId());
newEntity.setServiceName(stateEntity.getServiceName());
newEntity.setComponentName(stateEntity.getComponentName());
newEntity.setHostName(stateEntity.getHostName());
newEntity.setConfigType(entry.getKey());
newEntity.setVersionTag(entry.getValue());
newEntity.setTimestamp(now);
if (LOG.isDebugEnabled()) {
LOG.debug("Adding new live config to ServiceComponentHost"
+ ", clusterId=" + stateEntity.getClusterId()
+ ", serviceName=" + stateEntity.getServiceName()
+ ", componentName=" + stateEntity.getComponentName()
+ ", hostname=" + stateEntity.getHostName()
+ ", configType=" + entry.getKey()
+ ", configVersionTag=" + entry.getValue());
}
stateEntity.getHostComponentConfigMappingEntities().add(newEntity);
newEntity.setHostComponentStateEntity(stateEntity);
hostComponentConfigMappingDAO.create(newEntity);
}
}
if (!deletedTypes.isEmpty()) {