Single-mode selection for hard x-ray cavity resonance.