@NotThreadSafe public static class AggregationOptions.Builder extends Object
AggregationOptions.| Modifier and Type | Method and Description | 
|---|---|
| AggregationOptions.Builder | allowDiskUse(Boolean allowDiskUse)Set whether to enable external sort capabilities. | 
| AggregationOptions.Builder | batchSize(Integer size)Sets the size of batches to use when iterating over results. | 
| AggregationOptions | build()Return the options based on this builder. | 
| AggregationOptions.Builder | bypassDocumentValidation(Boolean bypassDocumentValidation)Sets whether to bypass document validation. | 
| AggregationOptions.Builder | collation(Collation collation)Sets the collation | 
| AggregationOptions.Builder | maxTime(long maxTime,
       TimeUnit timeUnit)Sets the maximum execution time for the aggregation command. | 
| AggregationOptions.Builder | outputMode(AggregationOptions.OutputMode mode)The mode of output for this configuration. | 
public AggregationOptions.Builder batchSize(Integer size)
size - the batch size to apply to the cursorthis so calls can be chainedpublic AggregationOptions.Builder allowDiskUse(Boolean allowDiskUse)
allowDiskUse - whether or not aggregation stages can write data to temporary filesthis so calls can be chainedpublic AggregationOptions.Builder outputMode(AggregationOptions.OutputMode mode)
mode - an OutputMode that defines how to output the results of the aggregationthis so calls can be chainedAggregationOptions.OutputModepublic AggregationOptions.Builder maxTime(long maxTime, TimeUnit timeUnit)
maxTime - the max timetimeUnit - the time unitthis so calls can be chainedpublic AggregationOptions.Builder bypassDocumentValidation(Boolean bypassDocumentValidation)
bypassDocumentValidation - whether to bypass document validation, or null if unspecifiedpublic AggregationOptions.Builder collation(Collation collation)
collation - the collationpublic AggregationOptions build()