Package com.mongodb

Class CreateIndexCommitQuorum


  • public abstract class CreateIndexCommitQuorum
    extends Object
    A commit quorum specifies how many data-bearing members of a replica set, including the primary, must complete the index builds successfully before the primary marks the indexes as ready.
    Since:
    4.1
    MongoDB documentation
    Create indexes
    Since server release
    4.4
    • Method Detail

      • create

        public static CreateIndexCommitQuorum create​(String mode)
        Create a create index commit quorum with a mode value.
        Parameters:
        mode - the mode value
        Returns:
        a create index commit quorum of the specified mode
      • create

        public static CreateIndexCommitQuorum create​(int w)
        Create a create index commit quorum with a w value.
        Parameters:
        w - the w value
        Returns:
        a create index commit quorum with the specified w value
      • toBsonValue

        public abstract BsonValue toBsonValue()
        Converts the create index commit quorum to a Bson value.
        Returns:
        the BsonValue that represents the create index commit quorum