Package com.mongodb
Class ReadPreferenceHedgeOptions
- java.lang.Object
- 
- com.mongodb.ReadPreferenceHedgeOptions
 
- 
 @Immutable public final class ReadPreferenceHedgeOptions extends Object Options to apply to hedged reads in the server.- Since:
- 4.1
- Since server release
- 4.4
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classReadPreferenceHedgeOptions.BuilderThe builder for read preference hedge options
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ReadPreferenceHedgeOptions.Builderbuilder()Gets an instance of a builderbooleanequals(Object o)inthashCode()booleanisEnabled()Gets whether hedged reads are enabled in the server.BsonDocumenttoBsonDocument()Convert the hedge options to a BsonDocument.StringtoString()
 
- 
- 
- 
Method Detail- 
isEnabledpublic boolean isEnabled() Gets whether hedged reads are enabled in the server.- Returns:
- true if hedged reads are enabled in the server
 
 - 
builderpublic static ReadPreferenceHedgeOptions.Builder builder() Gets an instance of a builder- Returns:
- a builder instance
 
 - 
toBsonDocumentpublic BsonDocument toBsonDocument() Convert the hedge options to a BsonDocument.- Returns:
- a BsonDocument containing the hedge options
 
 
- 
 
-