예제 #1
0
 public Condition getInstanceHostConstraint(Instance instance) {
   if (StringUtils.isEmpty(instance.getDeploymentUnitUuid())) {
     return INSTANCE_HOST_MAP.INSTANCE_ID.eq(instance.getId());
   } else {
     return INSTANCE.DEPLOYMENT_UNIT_UUID.eq(instance.getDeploymentUnitUuid());
   }
 }
예제 #2
0
 protected void addInstanceToDeploymentUnits(
     Map<String, List<Instance>> deploymentUnitInstancesToUpgrade, Instance instance) {
   List<Instance> toRemove =
       deploymentUnitInstancesToUpgrade.get(instance.getDeploymentUnitUuid());
   if (toRemove == null) {
     toRemove = new ArrayList<Instance>();
   }
   toRemove.add(instance);
   deploymentUnitInstancesToUpgrade.put(instance.getDeploymentUnitUuid(), toRemove);
 }