private Collection<Container> distributeForRequestedCount(List<Container> candidates, int count) {
		int candidateCount = candidates.size();
		if (candidateCount == 0) {
			return candidates;
		}

		if (count <= 0 || count >= candidateCount) {

			return candidates;
		}
		else if (count == 1) {
			return Collections.singleton(candidates.get(getAndRotateIndex(candidateCount)));
		}
		else {
			// create a new list with the specific number of targeted containers;
			List<Container> targets = new ArrayList<Container>();
			while (targets.size() < count) {
				targets.add(candidates.get(getAndRotateIndex(candidateCount)));

			}
			return targets;
		}
	}
Select a subset of containers to satisfy the requested number of module instances using a round robin
distribution for successive calls. A count of 0 means all members that matched the criteria expression. count >=
candidates means each of the candidates should host a module.

@param candidates the list of available containers that match the selection criteria
@param count the requested number of module instances to deploy
@return a subset of candidates <= count
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/server/admin/deployment/ContainerMatcher.java