TResult
- The type of the result.public interface AggregatePublisher<TResult>
extends org.reactivestreams.Publisher<TResult>
Modifier and Type | Method and Description |
---|---|
AggregatePublisher<TResult> |
allowDiskUse(java.lang.Boolean allowDiskUse)
Enables writing to temporary files.
|
AggregatePublisher<TResult> |
batchSize(int batchSize)
Sets the number of documents to return per batch.
|
AggregatePublisher<TResult> |
bypassDocumentValidation(java.lang.Boolean bypassDocumentValidation)
Sets the bypass document level validation flag.
|
AggregatePublisher<TResult> |
collation(Collation collation)
Sets the collation options
|
AggregatePublisher<TResult> |
comment(java.lang.String comment)
Sets the comment to the aggregation.
|
org.reactivestreams.Publisher<TResult> |
first()
Helper to return a publisher limited to the first result.
|
AggregatePublisher<TResult> |
hint(Bson hint)
Sets the hint for which index to use.
|
AggregatePublisher<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. |
AggregatePublisher<TResult> |
maxTime(long maxTime,
java.util.concurrent.TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
org.reactivestreams.Publisher<Success> |
toCollection()
Aggregates documents according to the specified aggregation pipeline, which must end with a $out stage.
|
AggregatePublisher<TResult> |
useCursor(java.lang.Boolean useCursor)
Deprecated.
There is no replacement for this. Applications can assume that the driver will use a cursor for server versions
that support it (>= 2.6). The driver will ignore this as of MongoDB 3.6, which does not support inline results for the aggregate
command.
|
AggregatePublisher<TResult> allowDiskUse(java.lang.Boolean allowDiskUse)
allowDiskUse
- true if writing to temporary files is enabledAggregatePublisher<TResult> maxTime(long maxTime, java.util.concurrent.TimeUnit timeUnit)
maxTime
- the max timetimeUnit
- the time unit, which may not be nullAggregatePublisher<TResult> maxAwaitTime(long maxAwaitTime, java.util.concurrent.TimeUnit timeUnit)
$changeStream
aggregation.
A zero value will be ignored.maxAwaitTime
- the max await timetimeUnit
- the time unit to return the result in@Deprecated AggregatePublisher<TResult> useCursor(java.lang.Boolean useCursor)
useCursor
- whether the server should use a cursor to return resultsAggregatePublisher<TResult> bypassDocumentValidation(java.lang.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.org.reactivestreams.Publisher<Success> toCollection()
AggregatePublisher<TResult> collation(Collation collation)
A null value represents the server default.
collation
- the collation options to useAggregatePublisher<TResult> comment(java.lang.String comment)
comment
- the commentAggregatePublisher<TResult> hint(Bson hint)
hint
- the hintAggregatePublisher<TResult> batchSize(int batchSize)
Overrides the Subscription.request(long)
value for setting the batch size, allowing for fine grained
control over the underlying cursor.
batchSize
- the batch sizeorg.reactivestreams.Publisher<TResult> first()