private boolean isDeployInUse(Optional<SingularityRequestDeployState> requestDeployState, String deployId, boolean mustMatchActiveDeploy) { if (!requestDeployState.isPresent()) { return false; } if (matchesDeployMarker(requestDeployState.get().getActiveDeploy(), deployId)) { return true; } if (mustMatchActiveDeploy) { return false; } return matchesDeployMarker(requestDeployState.get().getPendingDeploy(), deployId); }
private boolean matchesDeploy(SingularityRequestDeployState requestDeployState, SingularityTaskRequest taskRequest) { if (requestDeployState == null) { return false; } return matchesDeployMarker(requestDeployState.getActiveDeploy(), taskRequest.getDeploy().getId()) || matchesDeployMarker(requestDeployState.getPendingDeploy(), taskRequest.getDeploy().getId()); }
private boolean isDeployInUse(Optional<SingularityRequestDeployState> requestDeployState, String deployId, boolean mustMatchActiveDeploy) { if (!requestDeployState.isPresent()) { return false; } if (matchesDeployMarker(requestDeployState.get().getActiveDeploy(), deployId)) { return true; } if (mustMatchActiveDeploy) { return false; } return matchesDeployMarker(requestDeployState.get().getPendingDeploy(), deployId); }
private boolean matchesDeploy(SingularityRequestDeployState requestDeployState, SingularityTaskRequest taskRequest) { if (requestDeployState == null) { return false; } return matchesDeployMarker(requestDeployState.getActiveDeploy(), taskRequest.getDeploy().getId()) || matchesDeployMarker(requestDeployState.getPendingDeploy(), taskRequest.getDeploy().getId()); }