Criteria for discrete spectra