Two men convicted in a deadly gang-related ambush in the California city of Stockton have been sentenced to decades in state prison.