Package com.mongodb.client.model
Class CreateIndexOptions
java.lang.Object
com.mongodb.client.model.CreateIndexOptions
The options to apply to the command when creating indexes.
- Since:
- 3.6
- MongoDB documentation
- Index options
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncommitQuorum
(CreateIndexCommitQuorum commitQuorum) Sets the create index commit quorum for this operation.Gets the create index commit quorum for this operation.long
getMaxTime
(TimeUnit timeUnit) Gets the maximum execution time on the server for this operation.Sets the maximum execution time on the server for this operation.toString()
-
Constructor Details
-
CreateIndexOptions
public CreateIndexOptions()
-
-
Method Details
-
getMaxTime
Gets the maximum execution time on the server for this operation. The default is 0, which places no limit on the execution time.- Parameters:
timeUnit
- the time unit to return the result in- Returns:
- the maximum execution time in the given time unit
-
maxTime
Sets the maximum execution time on the server for this operation.- Parameters:
maxTime
- the max timetimeUnit
- the time unit, which may not be null- Returns:
- this
-
getCommitQuorum
Gets the create index commit quorum for this operation.- Returns:
- the create index commit quorum
- Since:
- 4.1
- Since server release
- 4.4
-
commitQuorum
Sets the create index commit quorum for this operation.- Parameters:
commitQuorum
- the create index commit quorum- Returns:
- this
- Since:
- 4.1
- Since server release
- 4.4
-
toString
-