Package com.mongodb

Class 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
    • 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 BsonDocument toBsonDocument()
        Convert the hedge options to a BsonDocument.
        Returns:
        a BsonDocument containing the hedge options
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object