Package com.mongodb

Class ReadPreferenceHedgeOptions


  • @Immutable
    public final class ReadPreferenceHedgeOptions
    extends java.lang.Object
    Options to apply to hedged reads in the server.
    Since:
    4.1
    Since server release
    4.4
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Gets whether hedged reads are enabled in the server.
        Returns:
        true if hedged reads are enabled in the server
      • toBsonDocument

        public org.bson.BsonDocument toBsonDocument()
        Convert the hedge options to a BsonDocument.
        Returns:
        a BsonDocument containing the hedge options
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object