TResult
- The type of the result.public interface AggregateIterable<TResult> extends MongoIterable<TResult>
Modifier and Type | Method and Description |
---|---|
AggregateIterable<TResult> |
allowDiskUse(Boolean allowDiskUse)
Enables writing to temporary files.
|
AggregateIterable<TResult> |
batchSize(int batchSize)
Sets the number of documents to return per batch.
|
AggregateIterable<TResult> |
bypassDocumentValidation(Boolean bypassDocumentValidation)
Sets the bypass document level validation flag.
|
AggregateIterable<TResult> |
collation(Collation collation)
Sets the collation options
|
AggregateIterable<TResult> |
maxTime(long maxTime,
TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
void |
toCollection(SingleResultCallback<Void> callback)
Aggregates documents according to the specified aggregation pipeline, which must end with a $out stage.
|
AggregateIterable<TResult> |
useCursor(Boolean useCursor)
Sets whether the server should use a cursor to return results.
|
batchCursor, first, forEach, into, map
AggregateIterable<TResult> allowDiskUse(Boolean allowDiskUse)
allowDiskUse
- true if writing to temporary files is enabledAggregateIterable<TResult> maxTime(long maxTime, TimeUnit timeUnit)
maxTime
- the max timetimeUnit
- the time unit, which may not be nullAggregateIterable<TResult> useCursor(Boolean useCursor)
useCursor
- whether the server should use a cursor to return resultsvoid toCollection(SingleResultCallback<Void> callback)
callback
- the callback, which is called when the aggregation completesAggregateIterable<TResult> batchSize(int batchSize)
batchSize
in interface MongoIterable<TResult>
batchSize
- the batch sizeAggregateIterable<TResult> bypassDocumentValidation(Boolean bypassDocumentValidation)
Note: This only applies when an $out stage is specified
.bypassDocumentValidation
- If true, allows the write to opt-out of document level validation.AggregateIterable<TResult> collation(Collation collation)
A null value represents the server default.
collation
- the collation options to use