Package com.mongodb
Class AggregationOptions
- java.lang.Object
-
- com.mongodb.AggregationOptions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AggregationOptions.Builder
Builder for creatingAggregationOptions
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AggregationOptions.Builder
builder()
Creates a new Builder forAggregationOptions
.Boolean
getAllowDiskUse()
If true, this enables external sort capabilities, otherwise $sort produces an error if the operation consumes 10 percent or more of RAM.Integer
getBatchSize()
The size of batches to use when iterating over results.Boolean
getBypassDocumentValidation()
Gets whether to bypass document validation, or null if unspecified.Collation
getCollation()
Returns the collation optionslong
getMaxTime(TimeUnit timeUnit)
Gets the maximum execution time for the aggregation command.String
toString()
-
-
-
Method Detail
-
getAllowDiskUse
@Nullable public Boolean getAllowDiskUse()
If 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
-
getBatchSize
@Nullable public Integer getBatchSize()
The size of batches to use when iterating over results.- Returns:
- the batch size
-
getMaxTime
public long getMaxTime(TimeUnit timeUnit)
Gets the maximum execution time for the aggregation command.- Parameters:
timeUnit
- the time unit for the result- Returns:
- the max time
- Since:
- 2.12
-
getBypassDocumentValidation
@Nullable public Boolean getBypassDocumentValidation()
Gets 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
-
getCollation
@Nullable public Collation getCollation()
Returns the collation options- Returns:
- the collation options
- Since:
- 3.4
- Since server release
- 3.4
-
builder
public static AggregationOptions.Builder builder()
Creates a new Builder forAggregationOptions
.- Returns:
- a new empty builder.
-
-