Class ReadPreference
Represents a read preference.
public sealed class ReadPreference : IEquatable<ReadPreference>
- Inheritance
-
ReadPreference
- Implements
- Inherited Members
Constructors
- ReadPreference(ReadPreferenceMode, IEnumerable<TagSet>, TimeSpan?, ReadPreferenceHedge)
Initializes a new instance of the ReadPreference class.
Properties
- Hedge
Gets the hedge.
- MaxStaleness
Gets the maximum staleness.
- Nearest
Gets an instance of ReadPreference that represents a Nearest read preference.
- Primary
Gets an instance of ReadPreference that represents a Primary read preference.
- PrimaryPreferred
Gets an instance of ReadPreference that represents a PrimaryPreferred read preference.
- ReadPreferenceMode
Gets the read preference mode.
- Secondary
Gets an instance of ReadPreference that represents a Secondary read preference.
- SecondaryPreferred
Gets an instance of ReadPreference that represents a SecondaryPreferred read preference.
- TagSets
Gets the tag sets.
Methods
- FromBsonDocument(BsonDocument)
Creates a new ReadPreference instance from a BsonDocument.
- With(ReadPreferenceHedge)
Returns a new instance of ReadPreference with some values changed.
- With(ReadPreferenceMode)
Returns a new instance of ReadPreference with some values changed.
- With(IEnumerable<TagSet>)
Returns a new instance of ReadPreference with some values changed.
- With(TimeSpan?)
Returns a new instance of ReadPreference with some values changed.