private boolean equalTo(ImmutableIntegrationDeploymentOverview another) { return Objects.equals(userId, another.userId) && currentState.equals(another.currentState) && targetState.equals(another.targetState) && stepsDone.equals(another.stepsDone) && Objects.equals(statusMessage, another.statusMessage) && Objects.equals(id, another.id) && version == another.version && createdAt == another.createdAt && updatedAt == another.updatedAt; }
private boolean equalTo(ImmutableIntegrationDeployment another) { return integrationId.equals(another.integrationId) && Objects.equals(spec, another.spec) && Objects.equals(userId, another.userId) && currentState.equals(another.currentState) && targetState.equals(another.targetState) && stepsDone.equals(another.stepsDone) && Objects.equals(statusMessage, another.statusMessage) && Objects.equals(id, another.id) && version == another.version && createdAt == another.createdAt && updatedAt == another.updatedAt; }
private boolean equalTo(ImmutableIntegrationOverview another) { return isDraft == another.isDraft && currentState.equals(another.currentState) && targetState.equals(another.targetState) && Objects.equals(deploymentVersion, another.deploymentVersion) && deployments.equals(another.deployments) && board.equals(another.board) && Objects.equals(url, another.url) && Objects.equals(id, another.id) && isDeleted == another.isDeleted && steps.equals(another.steps) && flows.equals(another.flows) && connections.equals(another.connections) && Objects.equals(description, another.description) && properties.equals(another.properties) && configuredProperties.equals(another.configuredProperties) && version == another.version && createdAt == another.createdAt && updatedAt == another.updatedAt && tags.equals(another.tags) && Objects.equals(name, another.name) && resources.equals(another.resources); }
private boolean stale(StateChangeHandler handler, IntegrationDeployment integrationDeployment) { if (integrationDeployment == null || handler == null) { return true; } IntegrationDeploymentState desiredState = integrationDeployment.getTargetState(); return desiredState.equals(integrationDeployment.getCurrentState()); }
private void checkIntegrationStatus(IntegrationDeployment integrationDeployment) { if (integrationDeployment == null) { return; } IntegrationDeployment reconciled = reconcileDeployment(integrationDeployment); IntegrationDeploymentState desiredState = reconciled.getTargetState(); IntegrationDeploymentState currentState = reconciled.getCurrentState(); if (!currentState.equals(desiredState)) { reconciled.getId().ifPresent(integrationDeploymentId -> { StateChangeHandler statusChangeHandler = handlers.get(desiredState); if (statusChangeHandler != null) { LOG.info("Integration {} : Desired status \"{}\" != current status \"{}\" --> calling status change handler", integrationDeploymentId, desiredState.toString(), currentState); callStateChangeHandler(statusChangeHandler, reconciled); } }); } else if (reconciled.getCurrentState() != integrationDeployment.getCurrentState()) { dataManager.update(reconciled); scheduledChecks.remove(getIntegrationMarkerKey(reconciled)); } else { scheduledChecks.remove(getIntegrationMarkerKey(reconciled)); } }
private Collection<? extends LeveledMessage> computeDeploymentDifferences(Integration integration, Collection<IntegrationDeployment> allDeployments) { List<IntegrationDeployment> deployments = allDeployments.stream() .filter(d -> d.getIntegrationId().equals(integration.getId())) .filter(d -> d.getCurrentState().equals(IntegrationDeploymentState.Published)) .collect(Collectors.toList());
if (targetState.equals(Published)) {