public class AggregationOptions extends Object
Aggregation.withOptions(AggregationOptions),
TypedAggregation.withOptions(AggregationOptions)| Modifier and Type | Class and Description |
|---|---|
static class |
AggregationOptions.Builder
A Builder for
AggregationOptions. |
| Constructor and Description |
|---|
AggregationOptions(boolean allowDiskUse,
boolean explain,
org.bson.Document cursor)
Creates a new
AggregationOptions. |
AggregationOptions(boolean allowDiskUse,
boolean explain,
org.bson.Document cursor,
Collation collation)
Creates a new
AggregationOptions. |
AggregationOptions(boolean allowDiskUse,
boolean explain,
org.bson.Document cursor,
Collation collation,
String comment)
Creates a new
AggregationOptions. |
AggregationOptions(boolean allowDiskUse,
boolean explain,
int cursorBatchSize)
Creates a new
AggregationOptions. |
| Modifier and Type | Method and Description |
|---|---|
static AggregationOptions.Builder |
builder()
Obtain a new
AggregationOptions.Builder for constructing AggregationOptions. |
static AggregationOptions |
fromDocument(org.bson.Document document)
Creates new
AggregationOptions given DBObject containing aggregation options. |
Optional<Collation> |
getCollation()
Get collation settings for string comparison.
|
Optional<String> |
getComment()
Get the comment for the aggregation.
|
Optional<org.bson.Document> |
getCursor()
Specify a document that contains options that control the creation of the cursor object.
|
Integer |
getCursorBatchSize()
The initial cursor batch size, if available, otherwise null.
|
boolean |
isAllowDiskUse()
Enables writing to temporary files.
|
boolean |
isExplain()
Specifies to return the information on the processing of the pipeline.
|
org.bson.Document |
toDocument()
Returns a
Document representation of this AggregationOptions. |
String |
toString() |
public AggregationOptions(boolean allowDiskUse,
boolean explain,
org.bson.Document cursor)
AggregationOptions.allowDiskUse - whether to off-load intensive sort-operations to disk.explain - whether to get the execution plan for the aggregation instead of the actual results.cursor - can be null, used to pass additional options to the aggregation.public AggregationOptions(boolean allowDiskUse,
boolean explain,
@Nullable
org.bson.Document cursor,
@Nullable
Collation collation)
AggregationOptions.allowDiskUse - whether to off-load intensive sort-operations to disk.explain - whether to get the execution plan for the aggregation instead of the actual results.cursor - can be null, used to pass additional options (such as batchSize) to the
aggregation.collation - collation for string comparison. Can be null.public AggregationOptions(boolean allowDiskUse,
boolean explain,
@Nullable
org.bson.Document cursor,
@Nullable
Collation collation,
@Nullable
String comment)
AggregationOptions.allowDiskUse - whether to off-load intensive sort-operations to disk.explain - whether to get the execution plan for the aggregation instead of the actual results.cursor - can be null, used to pass additional options (such as batchSize) to the
aggregation.collation - collation for string comparison. Can be null.comment - execution comment. Can be null.public AggregationOptions(boolean allowDiskUse,
boolean explain,
int cursorBatchSize)
AggregationOptions.allowDiskUse - whether to off-load intensive sort-operations to disk.explain - whether to get the execution plan for the aggregation instead of the actual results.cursorBatchSize - initial cursor batch size.public static AggregationOptions fromDocument(org.bson.Document document)
AggregationOptions given DBObject containing aggregation options.document - must not be null.AggregationOptions.public static AggregationOptions.Builder builder()
AggregationOptions.Builder for constructing AggregationOptions.public boolean isAllowDiskUse()
public boolean isExplain()
@Nullable public Integer getCursorBatchSize()
public Optional<org.bson.Document> getCursor()
public Optional<Collation> getCollation()
public Optional<String> getComment()
public org.bson.Document toDocument()
Document representation of this AggregationOptions.Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.