public class AggregateOptions extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BATCH_SIZE
The default value of batchSize = 20.
|
static long |
DEFAULT_MAX_AWAIT_TIME
The default value of maxAwaitTime = 1000.
|
static long |
DEFAULT_MAX_TIME
The default value of maxTime = 0.
|
Constructor and Description |
---|
AggregateOptions()
Default constructor
|
AggregateOptions(AggregateOptions options)
Copy constructor
|
AggregateOptions(JsonObject options)
Constructor from JSON
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Boolean |
getAllowDiskUse()
Get the flag if writing to temporary files is enabled.
|
int |
getBatchSize() |
CollationOptions |
getCollation() |
long |
getMaxTime()
Get the specified time limit in milliseconds for processing operations on a cursor.
|
int |
hashCode() |
AggregateOptions |
setAllowDiskUse(Boolean allowDiskUse)
Set the flag if writing to temporary files is enabled.
|
AggregateOptions |
setBatchSize(int batchSize)
Set the batch size for methods loading found data in batches.
|
AggregateOptions |
setCollation(CollationOptions collation)
Optional.
|
AggregateOptions |
setMaxTime(long maxTime)
Set the time limit in milliseconds for processing operations on a cursor.
|
JsonObject |
toJson()
Convert to JSON
|
String |
toString() |
public static final int DEFAULT_BATCH_SIZE
public static final long DEFAULT_MAX_TIME
public static final long DEFAULT_MAX_AWAIT_TIME
public AggregateOptions()
public AggregateOptions(AggregateOptions options)
options
- the one to copypublic AggregateOptions(JsonObject options)
options
- the JSONpublic CollationOptions getCollation()
public AggregateOptions setCollation(CollationOptions collation)
Specifies the collation to use for the operation.
Collation allows users to specify language-specific rules for string comparison, such as rules for lettercase and accent marks.
collation
- public JsonObject toJson()
public long getMaxTime()
public AggregateOptions setMaxTime(long maxTime)
maxTime
- the time limit in milliseconds for processing operations on a cursorpublic int getBatchSize()
public AggregateOptions setBatchSize(int batchSize)
batchSize
- the number of documents in a batchpublic Boolean getAllowDiskUse()
public AggregateOptions setAllowDiskUse(Boolean allowDiskUse)
allowDiskUse
- the flag indicating disk usage on aggregate or not.Copyright © 2023 Eclipse. All rights reserved.