I am by no means an expert, but I think it's certainly a 301. Both for the semantics (your site is permanently on your chosen main domain) and for search engines to list you as one site and not dilute any ranking points. The general advice seems to be to use 302 for redirects within the site, eg for out-of-stock items.