Package com.mongodb
Class TaggableReadPreference
- java.lang.Object
 - 
- com.mongodb.ReadPreference
 - 
- com.mongodb.TaggableReadPreference
 
 
 
- 
@Immutable @Deprecated(since="2021-05-27") public abstract class TaggableReadPreference extends ReadPreference
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.Abstract class for all preference which can be combined with tags 
- 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Deprecated.java.lang.LonggetMaxStaleness(java.util.concurrent.TimeUnit timeUnit)Deprecated.Gets the maximum acceptable staleness of a secondary in order to be considered for read operations.java.util.List<TagSet>getTagSetList()Deprecated.Gets the list of tag sets as a list ofTagSetinstances.inthashCode()Deprecated.booleanisSlaveOk()Deprecated.True if this read preference allows reading from a secondary member of a replica set.BsonDocumenttoDocument()Deprecated.Gets a document representing this read preference in the wire protocol.java.lang.StringtoString()Deprecated.- 
Methods inherited from class com.mongodb.ReadPreference
choose, getName, nearest, nearest, nearest, nearest, nearest, nearest, primary, primaryPreferred, primaryPreferred, primaryPreferred, primaryPreferred, primaryPreferred, primaryPreferred, secondary, secondary, secondary, secondary, secondary, secondary, secondaryPreferred, secondaryPreferred, secondaryPreferred, secondaryPreferred, secondaryPreferred, secondaryPreferred, valueOf, valueOf, valueOf 
 - 
 
 - 
 
- 
- 
Method Detail
- 
isSlaveOk
public boolean isSlaveOk()
Deprecated.Description copied from class:ReadPreferenceTrue if this read preference allows reading from a secondary member of a replica set.- Specified by:
 isSlaveOkin classReadPreference- Returns:
 - if reading from a secondary is ok
 
 
- 
toDocument
public BsonDocument toDocument()
Deprecated.Description copied from class:ReadPreferenceGets a document representing this read preference in the wire protocol.- Specified by:
 toDocumentin classReadPreference- Returns:
 - the document
 
 
- 
getTagSetList
public java.util.List<TagSet> getTagSetList()
Deprecated.Gets the list of tag sets as a list ofTagSetinstances.- Returns:
 - the list of tag sets
 - Since:
 - 2.13
 
 
- 
getMaxStaleness
@Nullable public java.lang.Long getMaxStaleness(java.util.concurrent.TimeUnit timeUnit)
Deprecated.Gets the maximum acceptable staleness of a secondary in order to be considered for read operations.The maximum staleness feature is designed to prevent badly-lagging servers from being selected. The staleness estimate is imprecise and shouldn't be used to try to select "up-to-date" secondaries.
The driver estimates the staleness of each secondary, based on lastWriteDate values provided in server isMaster responses, and selects only those secondaries whose staleness is less than or equal to maxStaleness.
- Parameters:
 timeUnit- the time unit in which to return the value- Returns:
 - the maximum acceptable staleness in the given time unit, or null if the value is not set
 - Since:
 - 3.4
 
 
- 
toString
public java.lang.String toString()
Deprecated.- Overrides:
 toStringin classjava.lang.Object
 
- 
equals
public boolean equals(java.lang.Object o)
Deprecated.- Overrides:
 equalsin classjava.lang.Object
 
- 
hashCode
public int hashCode()
Deprecated.- Overrides:
 hashCodein classjava.lang.Object
 
 - 
 
 -