Package io.quarkus.mongodb
Class AggregateOptions
- java.lang.Object
-
- io.quarkus.mongodb.AggregateOptions
-
public class AggregateOptions extends Object
Configures the aggregate streams.
-
-
Constructor Summary
Constructors Constructor Description AggregateOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AggregateOptionsallowDiskUse(boolean allowDiskUse)Enables writing to temporary files.<T> com.mongodb.reactivestreams.client.AggregatePublisher<T>apply(com.mongodb.reactivestreams.client.AggregatePublisher<T> stream)AggregateOptionsbatchSize(int size)Sets the number of documents to return per batch.AggregateOptionsbypassDocumentValidation(boolean bypassDocumentValidation)Sets the bypass document level validation flag.AggregateOptionscollation(com.mongodb.client.model.Collation collation)Sets the collation optionsAggregateOptionscomment(String comment)Sets the comment to the aggregation.AggregateOptionshint(org.bson.conversions.Bson hint)Sets the hint for which index to use.AggregateOptionsmaxAwaitTime(long maxAwaitTime, TimeUnit timeUnit)The maximum amount of time for the server to wait on new documents to satisfy a$changeStreamaggregation.AggregateOptionsmaxTime(long maxTime, TimeUnit timeUnit)Sets the maximum execution time on the server for this operation.
-
-
-
Method Detail
-
allowDiskUse
public AggregateOptions allowDiskUse(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:
- this
-
maxTime
public AggregateOptions maxTime(long maxTime, TimeUnit timeUnit)
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
public AggregateOptions maxAwaitTime(long maxAwaitTime, TimeUnit timeUnit)
The maximum amount of time for the server to wait on new documents to satisfy a$changeStreamaggregation.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
public AggregateOptions bypassDocumentValidation(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:
- this
-
collation
public AggregateOptions collation(com.mongodb.client.model.Collation collation)
Sets the collation optionsA null value represents the server default.
- Parameters:
collation- the collation options to use- Returns:
- this
-
comment
public AggregateOptions comment(String comment)
Sets the comment to the aggregation. A null value means no comment is set.- Parameters:
comment- the comment- Returns:
- this
-
hint
public AggregateOptions hint(org.bson.conversions.Bson hint)
Sets the hint for which index to use. A null value means no hint is set.- Parameters:
hint- the hint- Returns:
- this
-
batchSize
public AggregateOptions batchSize(int size)
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)
-
-