Package com.mongodb
Class AggregationOptions
java.lang.Object
com.mongodb.AggregationOptions
The options to apply to an aggregate operation.
- Since:
- 2.12
- MongoDB documentation
- aggregate
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder for creatingAggregationOptions.
- 
Method SummaryModifier and TypeMethodDescriptionstatic AggregationOptions.Builderbuilder()Creates a new Builder forAggregationOptions.If true, this enables external sort capabilities, otherwise $sort produces an error if the operation consumes 10 percent or more of RAM.The size of batches to use when iterating over results.Gets whether to bypass document validation, or null if unspecified.Returns the collation optionslonggetMaxTime(TimeUnit timeUnit) Gets the maximum execution time for the aggregation command.toString()
- 
Method Details- 
getAllowDiskUseIf true, this enables external sort capabilities, otherwise $sort produces an error if the operation consumes 10 percent or more of RAM.- Returns:
- true if aggregation stages can write data to temporary files
 
- 
getBatchSizeThe size of batches to use when iterating over results.- Returns:
- the batch size
 
- 
getMaxTimeGets the maximum execution time for the aggregation command.- Parameters:
- timeUnit- the time unit for the result
- Returns:
- the max time
- Since:
- 2.12
 
- 
getBypassDocumentValidationGets whether to bypass document validation, or null if unspecified. The default is null.- Returns:
- whether to bypass document validation, or null if unspecified.
- Since:
- 2.14
- Since server release
- 3.2
 
- 
getCollationReturns the collation options- Returns:
- the collation options
- Since:
- 3.4
- Since server release
- 3.4
 
- 
toString
- 
builderCreates a new Builder forAggregationOptions.- Returns:
- a new empty builder.
 
 
-