The maximum amount of time for the server to wait on new documents to satisfy a
$changeStream
aggregation.
Aggregates documents according to the specified aggregation pipeline, which must end with a $out stage.
Deprecated.
toCollection
void toCollection()
Aggregates documents according to the specified aggregation pipeline, which must end with a $out stage.
Throws:
java.lang.IllegalStateException
- if the pipeline does not end with a $out stage
Since:
allowDiskUse
AggregateIterable<TResult> allowDiskUse(@Nullable
java.lang.Boolean allowDiskUse)
Enables writing to temporary files. A null value indicates that it's unspecified.
Parameters:
allowDiskUse
- true if writing to temporary files is enabled
Returns:
batchSize
AggregateIterable<TResult> batchSize(int batchSize)
Sets the number of documents to return per batch.
Specified by:
batchSize
in interface
MongoIterable
<
TResult
>
Parameters:
batchSize
- the batch size
Returns:
maxTime
AggregateIterable<TResult> maxTime(long maxTime,
java.util.concurrent.TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
Parameters:
maxTime
- the max time
timeUnit
- the time unit, which may not be null
Returns:
AggregateIterable
<
TResult
> useCursor(@Nullable
java.lang.Boolean useCursor)
Deprecated.
Sets whether the server should use a cursor to return results.
Parameters:
useCursor
- whether the server should use a cursor to return results
Returns:
maxAwaitTime
AggregateIterable<TResult> maxAwaitTime(long maxAwaitTime,
java.util.concurrent.TimeUnit timeUnit)
The maximum amount of time for the server to wait on new documents to satisfy a
$changeStream
aggregation.
A zero value will be ignored.
Parameters:
maxAwaitTime
- the max await time
timeUnit
- the time unit to return the result in
Returns:
the maximum await execution time in the given time unit
Since:
bypassDocumentValidation
AggregateIterable<TResult> bypassDocumentValidation(@Nullable
java.lang.Boolean bypassDocumentValidation)
Sets the bypass document level validation flag.
Note: This only applies when an $out stage is specified
.
Parameters:
bypassDocumentValidation
- If true, allows the write to opt-out of document level validation.
Returns:
Since:
AggregateIterable<TResult> collation(@Nullable
Collation collation)
Sets the collation options
A null value represents the server default.
Parameters:
collation
- the collation options to use
Returns:
Since:
AggregateIterable<TResult> comment(@Nullable
java.lang.String comment)
Sets the comment to the aggregation. A null value means no comment is set.
Parameters:
comment
- the comment
Returns:
Since:
AggregateIterable<TResult> hint(@Nullable
Bson hint)
Sets the hint for which index to use. A null value means no hint is set.
Parameters:
hint
- the hint
Returns:
Since: