Fix code review issues: use valueOf(), rename parameter

- Use ReadPreference.valueOf(..) instead of my own implementation
- Rename "readPreference" to "read_preference"