spring-projects/spring-xd — pull request #963 by pperalta (2014-06-18 19:46:17+00:00)
Title: XD-1270: Add states to the deployment of stream

Summary of changes:

1. `ModuleDeploymentWriter` now returns `ModuleDeploymentStatus` which encapsulates everything related to individual module state.
2. The `ModuleDeploymentStatus` objects are aggregated and passed into an implementation of new interface `DeploymentUnitStateCalculator` which calculates the state of the job/stream based on the individual module states.
3. Interface `DeploymentUnit` was introduced to cover the common attributes for streams and jobs.
4. The status for streams/jobs is written into ZK under `/xd/deployments/streams//status` and `/xd/deployments/jobs//status`, respectively.
5. As a result, modules for streams and jobs are now under `/xd/deployments/streams//modules` and `/xd/deployments/jobs//modules`, respectively.
6. The stream and job repositories have a new method `getDeploymentStatus` which may be invoked to obtain the state of a stream/job.
7. Stream and job states are recalculated when a container joins or leaves the cluster.