A string describing the read preference mode (primary|primaryPreferred|secondary|secondaryPreferred|nearest)
Optional
tags: TagSet[]A tag set used to target reads to members with the specified tag(s). tagSet is not available if using read preference mode primary.
Optional
options: ReadPreferenceOptionsAdditional read preference options
Optional
hedgeOptional
maxOptional
minOptional
tagsStatic
nearestStatic
NEARESTStatic
primaryStatic
PRIMARYStatic
PRIMARY_Static
primaryStatic
secondaryStatic
SECONDARYStatic
SECONDARY_Static
secondaryCheck if the two ReadPreferences are equivalent
The read preference with which to check equality
Static
fromConstruct a ReadPreference given an options object.
Optional
options: ReadPreferenceFromOptionsThe options object from which to extract the read preference.
Static
fromStatic
isStatic
translateReplaces options.readPreference with a ReadPreference instance
The ReadPreference class is a class that represents a MongoDB ReadPreference and is used to construct connections.
See
https://www.mongodb.com/docs/manual/core/read-preference/