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
- Equals(ReadPreference)
Indicates whether the current object is equal to another object of the same type.
- Equals(object)
Determines whether the specified object is equal to the current object.
- FromBsonDocument(BsonDocument)
Creates a new ReadPreference instance from a BsonDocument.
- GetHashCode()
Serves as the default hash function.
- ToString()
Returns a string that represents the current object.
- 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.