class AggregateExplainOperation extends java.lang.Object implements AsyncReadOperation<BsonDocument>, ReadOperation<BsonDocument>
Modifier and Type | Field and Description |
---|---|
private java.lang.Boolean |
allowDiskUse |
private Collation |
collation |
private BsonDocument |
hint |
private long |
maxTimeMS |
private MongoNamespace |
namespace |
private java.util.List<BsonDocument> |
pipeline |
Constructor and Description |
---|
AggregateExplainOperation(MongoNamespace namespace,
java.util.List<BsonDocument> pipeline) |
Modifier and Type | Method and Description |
---|---|
AggregateExplainOperation |
allowDiskUse(java.lang.Boolean allowDiskUse)
Enables writing to temporary files.
|
AggregateExplainOperation |
collation(Collation collation)
Sets the collation options
|
BsonDocument |
execute(ReadBinding binding)
General execute which can return anything of type T
|
void |
executeAsync(AsyncReadBinding binding,
SingleResultCallback<BsonDocument> callback)
General execute which can return anything of type T
|
private BsonDocument |
getCommand() |
BsonDocument |
getHint()
Returns the hint for which index to use.
|
AggregateExplainOperation |
hint(BsonDocument hint)
Sets the hint for which index to use.
|
AggregateExplainOperation |
maxTime(long maxTime,
java.util.concurrent.TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
private final MongoNamespace namespace
private final java.util.List<BsonDocument> pipeline
private java.lang.Boolean allowDiskUse
private long maxTimeMS
private Collation collation
private BsonDocument hint
AggregateExplainOperation(MongoNamespace namespace, java.util.List<BsonDocument> pipeline)
public AggregateExplainOperation allowDiskUse(java.lang.Boolean allowDiskUse)
allowDiskUse
- true if writing to temporary files is enabledpublic AggregateExplainOperation maxTime(long maxTime, java.util.concurrent.TimeUnit timeUnit)
maxTime
- the max timetimeUnit
- the time unit, which may not be nullpublic AggregateExplainOperation collation(Collation collation)
A null value represents the server default.
collation
- the collation options to usepublic BsonDocument getHint()
public AggregateExplainOperation hint(BsonDocument hint)
hint
- the hintpublic BsonDocument execute(ReadBinding binding)
ReadOperation
execute
in interface ReadOperation<BsonDocument>
binding
- the binding to execute in the context ofpublic void executeAsync(AsyncReadBinding binding, SingleResultCallback<BsonDocument> callback)
AsyncReadOperation
executeAsync
in interface AsyncReadOperation<BsonDocument>
binding
- the binding to execute in the context ofcallback
- the callback to be called when the operation has been executedprivate BsonDocument getCommand()