public void updateReplicaState(Replica replica) {
		switch (replica.getState()) {
		case FAILED: 
		case CANCELLED: 
		case ABORTED:
			boolean anyRunning = false;
			for (Replica eachReplica : replica.getTask().getReplicas()) {
				if (ExecutionState.RUNNING.equals(eachReplica.getState())) {
					anyRunning = true;
					break;
				}
			}
			if (!anyRunning) {
				unallocatedTasks.add(replica.getTask());
			}
			
			break;
		default:
			break;
		}
	}