public class AggregateOptions extends Object
Constructor and Description |
---|
AggregateOptions() |
Modifier and Type | Method and Description |
---|---|
AggregateOptions |
allowDiskUse(Boolean allowDiskUse)
Enables writing to temporary files.
|
AggregateOptions |
batchSize(Integer batchSize)
Sets the number of documents to return per batch.
|
Boolean |
getAllowDiskUse()
Whether writing to temporary files is enabled.
|
Integer |
getBatchSize()
Gets the number of documents to return per batch.
|
long |
getMaxTime(TimeUnit timeUnit)
Gets the maximum execution time on the server for this operation.
|
Boolean |
getUseCursor()
Gets whether the server should use a cursor to return results.
|
AggregateOptions |
maxTime(long maxTime,
TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
AggregateOptions |
useCursor(Boolean useCursor)
Sets whether the server should use a cursor to return results.
|
public Boolean getAllowDiskUse()
public AggregateOptions allowDiskUse(Boolean allowDiskUse)
allowDiskUse
- true if writing to temporary files is enabledpublic Integer getBatchSize()
public AggregateOptions batchSize(Integer batchSize)
batchSize
- the batch sizepublic long getMaxTime(TimeUnit timeUnit)
timeUnit
- the time unit to return the result inpublic AggregateOptions maxTime(long maxTime, TimeUnit timeUnit)
maxTime
- the max timetimeUnit
- the time unit, which may not be nullpublic Boolean getUseCursor()
public AggregateOptions useCursor(Boolean useCursor)
useCursor
- whether the server should use a cursor to return results