class DefaultExecutionDeploymentTracker implements ExecutionDeploymentTracker {

	@Override
	public void stopTrackingDeploymentOf(ExecutionAttemptID executionAttemptId) {
		pendingDeployments.remove(executionAttemptId);
		ResourceID host = hostByExecution.remove(executionAttemptId);
		if (host != null) {
			executionsByHost.computeIfPresent(host, (resourceID, executionAttemptIds) -> {
				executionAttemptIds.remove(executionAttemptId);

				return executionAttemptIds.isEmpty()
					? null
					: executionAttemptIds;
			});
		}
	}

}