public class AggregateToCollectionOperation extends java.lang.Object implements AsyncWriteOperation<java.lang.Void>, WriteOperation<java.lang.Void>
| 构造器和说明 |
|---|
AggregateToCollectionOperation(MongoNamespace namespace,
java.util.List<BsonDocument> pipeline)
Construct a new instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
AggregateToCollectionOperation |
allowDiskUse(java.lang.Boolean allowDiskUse)
Enables writing to temporary files.
|
AggregateToCollectionOperation |
bypassDocumentValidation(java.lang.Boolean bypassDocumentValidation)
Sets the bypass document level validation flag.
|
java.lang.Void |
execute(WriteBinding binding)
General execute which can return anything of type T
|
void |
executeAsync(AsyncWriteBinding binding,
SingleResultCallback<java.lang.Void> callback)
General execute which can return anything of type T
|
java.lang.Boolean |
getAllowDiskUse()
Whether writing to temporary files is enabled.
|
java.lang.Boolean |
getBypassDocumentValidation()
Gets the bypass document level validation flag
|
long |
getMaxTime(java.util.concurrent.TimeUnit timeUnit)
Gets the maximum execution time on the server for this operation.
|
java.util.List<BsonDocument> |
getPipeline()
Gets the aggregation pipeline.
|
AggregateToCollectionOperation |
maxTime(long maxTime,
java.util.concurrent.TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
public AggregateToCollectionOperation(MongoNamespace namespace, java.util.List<BsonDocument> pipeline)
namespace - the database and collection namespace for the operation.pipeline - the aggregation pipeline.public java.util.List<BsonDocument> getPipeline()
public java.lang.Boolean getAllowDiskUse()
public AggregateToCollectionOperation allowDiskUse(java.lang.Boolean allowDiskUse)
allowDiskUse - true if writing to temporary files is enabledpublic long getMaxTime(java.util.concurrent.TimeUnit timeUnit)
timeUnit - the time unit to return the result inpublic AggregateToCollectionOperation maxTime(long maxTime, java.util.concurrent.TimeUnit timeUnit)
maxTime - the max timetimeUnit - the time unit, which may not be nullpublic java.lang.Boolean getBypassDocumentValidation()
public AggregateToCollectionOperation 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.public java.lang.Void execute(WriteBinding binding)
WriteOperationexecute 在接口中 WriteOperation<java.lang.Void>binding - the binding to execute in the context ofpublic void executeAsync(AsyncWriteBinding binding, SingleResultCallback<java.lang.Void> callback)
AsyncWriteOperationexecuteAsync 在接口中 AsyncWriteOperation<java.lang.Void>binding - the binding to execute in the context ofcallback - the callback to be called when the operation has been executed