public static class AggregationOptions.Builder extends Object
AggregationOptions
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
AggregationOptions.Builder |
allowDiskUse(boolean allowDiskUse)
Defines whether to off-load intensive sort-operations to disk.
|
AggregationOptions |
build()
Returns a new
AggregationOptions instance with the given configuration. |
AggregationOptions.Builder |
collation(Collation collation)
Define collation settings for string comparison.
|
AggregationOptions.Builder |
comment(String comment)
Define a comment to describe the execution.
|
AggregationOptions.Builder |
cursor(org.bson.Document cursor)
Additional options to the aggregation.
|
AggregationOptions.Builder |
cursorBatchSize(int batchSize)
Define the initial cursor batch size.
|
AggregationOptions.Builder |
explain(boolean explain)
Defines whether to get the execution plan for the aggregation instead of the actual results.
|
AggregationOptions.Builder |
hint(org.bson.Document hint)
Define a hint that is used by query optimizer to to fulfill the aggregation.
|
AggregationOptions.Builder |
maxTime(Duration maxTime)
Set the time limit for processing.
|
AggregationOptions.Builder |
noMapping()
Apply no domain type mapping at all taking the pipeline as-is.
|
AggregationOptions.Builder |
relaxedMapping()
Apply a relaxed domain type mapping considering
Field
annotations using the user provided name if a referenced field does not exist. |
AggregationOptions.Builder |
skipOutput()
Run the aggregation, but do NOT read the aggregation result from the store.
|
AggregationOptions.Builder |
strictMapping()
Apply a strict domain type mapping considering
Field
annotations throwing errors for non-existent, but referenced fields. |
public AggregationOptions.Builder allowDiskUse(boolean allowDiskUse)
allowDiskUse
- use true to allow disk use during the aggregation.public AggregationOptions.Builder explain(boolean explain)
explain
- use true to enable explain feature.public AggregationOptions.Builder cursor(org.bson.Document cursor)
cursor
- must not be null.public AggregationOptions.Builder cursorBatchSize(int batchSize)
batchSize
- use a positive int.public AggregationOptions.Builder collation(@Nullable Collation collation)
collation
- can be null.public AggregationOptions.Builder comment(@Nullable String comment)
comment
- can be null.public AggregationOptions.Builder hint(@Nullable org.bson.Document hint)
hint
- can be null.public AggregationOptions.Builder maxTime(@Nullable Duration maxTime)
maxTime
- Duration.ZERO
is used for the default unbounded behavior. Negative
values will be ignored.public AggregationOptions.Builder skipOutput()
public AggregationOptions.Builder strictMapping()
Field
annotations throwing errors for non-existent, but referenced fields.public AggregationOptions.Builder relaxedMapping()
Field
annotations using the user provided name if a referenced field does not exist.public AggregationOptions.Builder noMapping()
public AggregationOptions build()
AggregationOptions
instance with the given configuration.AggregationOptions
.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.