@NotThreadSafe public static class AggregationOptions.Builder extends java.lang.Object
AggregationOptions.| Modifier and Type | Field and Description |
|---|---|
private java.lang.Boolean |
allowDiskUse |
private java.lang.Integer |
batchSize |
private java.lang.Boolean |
bypassDocumentValidation |
private Collation |
collation |
private long |
maxTimeMS |
private AggregationOptions.OutputMode |
outputMode |
| Modifier | Constructor and Description |
|---|---|
private |
Builder() |
| 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)
The mode of output for this configuration.
|
private java.lang.Integer batchSize
private java.lang.Boolean allowDiskUse
private AggregationOptions.OutputMode outputMode
private long maxTimeMS
private java.lang.Boolean bypassDocumentValidation
private Collation collation
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 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, 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()