@NotThreadSafe public static class AggregationOptions.Builder extends java.lang.Object
AggregationOptions
.Modifier and Type | Method and Description |
---|---|
AggregationOptions.Builder |
allowDiskUse(java.lang.Boolean allowDiskUse)
Set whether to enable external sort capabilities.
|
AggregationOptions.Builder |
batchSize(java.lang.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(java.lang.Boolean bypassDocumentValidation)
Sets whether to bypass document validation.
|
AggregationOptions.Builder |
collation(Collation collation)
Sets the collation
|
AggregationOptions.Builder |
maxTime(long maxTime,
java.util.concurrent.TimeUnit timeUnit)
Sets the maximum execution time for the aggregation command.
|
AggregationOptions.Builder |
outputMode(AggregationOptions.OutputMode mode)
Deprecated.
There is no replacement for this. Applications can assume that the driver will use a cursor for server versions
that support it (>= 2.6). The driver will ignore this as of MongoDB 3.6, which does not support inline results for the
aggregate command.
|
public AggregationOptions.Builder batchSize(java.lang.Integer size)
size
- the batch size to apply to the cursorthis
so calls can be chainedpublic AggregationOptions.Builder allowDiskUse(java.lang.Boolean allowDiskUse)
allowDiskUse
- whether or not aggregation stages can write data to temporary filesthis
so calls can be chained@Deprecated public AggregationOptions.Builder outputMode(AggregationOptions.OutputMode mode)
mode
- an OutputMode
that defines how to output the results of the aggregation.this
so calls can be chainedAggregationOptions.OutputMode
public AggregationOptions.Builder maxTime(long maxTime, java.util.concurrent.TimeUnit timeUnit)
maxTime
- the max timetimeUnit
- the time unitthis
so calls can be chainedpublic AggregationOptions.Builder bypassDocumentValidation(java.lang.Boolean bypassDocumentValidation)
bypassDocumentValidation
- whether to bypass document validation, or null if unspecifiedpublic AggregationOptions.Builder collation(Collation collation)
collation
- the collationpublic AggregationOptions build()