Package io.quarkus.mongodb
Class AggregateOptions
java.lang.Object
io.quarkus.mongodb.AggregateOptions
Configures the aggregate streams.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowDiskUse
(boolean allowDiskUse) Enables writing to temporary files.<T> com.mongodb.reactivestreams.client.AggregatePublisher<T>
apply
(com.mongodb.reactivestreams.client.AggregatePublisher<T> stream) batchSize
(int size) Sets the number of documents to return per batch.bypassDocumentValidation
(boolean bypassDocumentValidation) Sets the bypass document level validation flag.collation
(com.mongodb.client.model.Collation collation) Sets the collation optionsSets the comment to the aggregation.hint
(org.bson.conversions.Bson hint) Sets the hint for which index to use.maxAwaitTime
(long maxAwaitTime, TimeUnit timeUnit) The maximum amount of time for the server to wait on new documents to satisfy a$changeStream
aggregation.Sets the maximum execution time on the server for this operation.
-
Constructor Details
-
AggregateOptions
public AggregateOptions()
-
-
Method Details
-
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:
- this
-
maxTime
Sets the maximum execution time on the server for this operation.- Parameters:
maxTime
- the max timetimeUnit
- the time unit, which may not be null- Returns:
- this
-
maxAwaitTime
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 timetimeUnit
- the time unit to return the result in- Returns:
- the maximum await execution time in the given time unit
-
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:
- this
-
collation
Sets the collation optionsA null value represents the server default.
- Parameters:
collation
- the collation options to use- Returns:
- this
-
comment
Sets the comment to the aggregation. A null value means no comment is set.- Parameters:
comment
- the comment- Returns:
- this
-
hint
Sets the hint for which index to use. A null value means no hint is set.- Parameters:
hint
- the hint- Returns:
- this
-
batchSize
Sets the number of documents to return per batch.Overrides the
Subscription.request(long)
value for setting the batch size, allowing for fine grained control over the underlying cursor.- Parameters:
size
- the batch size- Returns:
- this
-
apply
public <T> com.mongodb.reactivestreams.client.AggregatePublisher<T> apply(com.mongodb.reactivestreams.client.AggregatePublisher<T> stream)
-