The ReadPreference mode as listed above.
An object representing read preference tags.
All modes read from among the nearest candidates, but unlike other modes, NEAREST will include both the primary and all secondaries in the random selection.
Read from primary only. All operations produce an error (throw an exception where applicable) if primary is unavailable. Cannot be combined with tags (This is the default.).
Read from primary if available, otherwise a secondary.
Read from secondary if available, otherwise error.
Read from a secondary if available, otherwise read from the primary.
Validate if a mode is legal.
Validate if a mode is legal.
Generated using TypeDoc
Creates a new ReadPreference instance.
http://mongodb.github.io/node-mongodb-native/2.1/api/ReadPreference.html