Package io.vertx.mongo.client
Class AggregateOptions
- java.lang.Object
-
- io.vertx.mongo.client.AggregateOptions
-
public class AggregateOptions extends java.lang.Object
Options for aggregate.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description AggregateOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Integer
getBatchSize()
Collation
getCollation()
java.lang.String
getComment()
JsonObject
getHint()
java.lang.Long
getMaxAwaitTime()
java.lang.Long
getMaxTime()
java.lang.Boolean
isAllowDiskUse()
java.lang.Boolean
isBypassDocumentValidation()
AggregateOptions
setAllowDiskUse(java.lang.Boolean allowDiskUse)
Enables writing to temporary files.AggregateOptions
setBatchSize(java.lang.Integer batchSize)
Sets the number of documents to return per batch.AggregateOptions
setBypassDocumentValidation(java.lang.Boolean bypassDocumentValidation)
Sets the bypass document level validation flag.AggregateOptions
setCollation(Collation collation)
Sets the collation optionsAggregateOptions
setComment(java.lang.String comment)
Sets the comment to the aggregation.AggregateOptions
setHint(JsonObject hint)
Sets the hint for which index to use.AggregateOptions
setMaxAwaitTime(java.lang.Long maxAwaitTime)
The maximum amount of time for the server to wait on new documents to satisfy a$changeStream
aggregation.AggregateOptions
setMaxTime(java.lang.Long maxTime)
Sets the maximum execution time on the server for this operation.
-
-
-
Method Detail
-
setAllowDiskUse
public AggregateOptions setAllowDiskUse(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:
- this
- MongoDB documentation
- Aggregation
-
isAllowDiskUse
public java.lang.Boolean isAllowDiskUse()
-
setMaxTime
public AggregateOptions setMaxTime(java.lang.Long maxTime)
Sets the maximum execution time on the server for this operation.- Parameters:
maxTime
- the max time (in milliseconds)- Returns:
- this
- MongoDB documentation
- Max Time
-
getMaxTime
public java.lang.Long getMaxTime()
-
setMaxAwaitTime
public AggregateOptions setMaxAwaitTime(java.lang.Long 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 time (in milliseconds)- Returns:
- the maximum await execution time in the given time unit
- Since:
- 1.6
- Since server release
- 3.6
-
getMaxAwaitTime
public java.lang.Long getMaxAwaitTime()
-
setBypassDocumentValidation
public AggregateOptions setBypassDocumentValidation(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:
- this
- Since:
- 1.2
- Since server release
- 3.2
- MongoDB documentation
- Aggregation
-
isBypassDocumentValidation
public java.lang.Boolean isBypassDocumentValidation()
-
setCollation
public AggregateOptions setCollation(Collation collation)
Sets the collation optionsA null value represents the server default.
- Parameters:
collation
- the collation options to use- Returns:
- this
- Since:
- 1.3
- Since server release
- 3.4
-
getCollation
public Collation getCollation()
-
setComment
public AggregateOptions setComment(java.lang.String comment)
Sets the comment to the aggregation. A null value means no comment is set.- Parameters:
comment
- the comment- Returns:
- this
- Since:
- 1.7
- Since server release
- 3.6
-
getComment
public java.lang.String getComment()
-
setHint
public AggregateOptions setHint(JsonObject hint)
Sets the hint for which index to use. A null value means no hint is set.- Parameters:
hint
- the hint- Returns:
- this
- Since:
- 1.7
- Since server release
- 3.6
-
getHint
public JsonObject getHint()
-
setBatchSize
public AggregateOptions setBatchSize(java.lang.Integer 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:
batchSize
- the batch size- Returns:
- this
- Since:
- 1.8
- MongoDB documentation
- Batch Size
-
getBatchSize
public java.lang.Integer getBatchSize()
-
-