Package com.mongodb
Class CreateIndexCommitQuorum
java.lang.Object
com.mongodb.CreateIndexCommitQuorum
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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final CreateIndexCommitQuorum
A create index commit quorum of majority.static final CreateIndexCommitQuorum
A create index commit quorum of voting members. -
Method Summary
Modifier and TypeMethodDescriptionstatic CreateIndexCommitQuorum
create
(int w) Create a create index commit quorum with a w value.static CreateIndexCommitQuorum
Create a create index commit quorum with a mode value.abstract BsonValue
Converts the create index commit quorum to a Bson value.
-
Field Details
-
MAJORITY
A create index commit quorum of majority. -
VOTING_MEMBERS
A create index commit quorum of voting members.
-
-
Method Details
-
create
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
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
Converts the create index commit quorum to a Bson value.- Returns:
- the BsonValue that represents the create index commit quorum
-