io.vertx.ext.mongo

## Class AggregateOptions

- java.lang.Object
- - io.vertx.ext.mongo.AggregateOptions

-     public class AggregateOptions
      extends Object

  Options used to configure aggregate operations.
  Author:
    Nick Scavelli

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_BATCH_SIZE` The default value of batchSize = 10.
    `static long` | `DEFAULT_MAX_AWAIT_TIME` The default value of maxAwaitTime = 1000.
    `static long` | `DEFAULT_MAX_TIME` The default value of maxTime = 0.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AggregateOptions()` Default constructor
    `AggregateOptions(AggregateOptions options)` Copy constructor
    `AggregateOptions(JsonObject options)` Constructor from JSON

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `Boolean` | `getAllowDiskUse()` Get the flag if writing to temporary files is enabled.
    `int` | `getBatchSize()`
    `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` | `setMaxTime(long maxTime)` Set the time limit in milliseconds for processing operations on a cursor.
    `JsonObject` | `toJson()` Convert to JSON

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_BATCH_SIZE

          public static final int DEFAULT_BATCH_SIZE

      The default value of batchSize = 10.
      See Also:
        Constant Field Values

    - #### DEFAULT_MAX_TIME

          public static final long DEFAULT_MAX_TIME

      The default value of maxTime = 0.
      See Also:
        Constant Field Values

    - #### DEFAULT_MAX_AWAIT_TIME

          public static final long DEFAULT_MAX_AWAIT_TIME

      The default value of maxAwaitTime = 1000.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AggregateOptions

          public AggregateOptions()

      Default constructor

    - #### AggregateOptions

          public AggregateOptions(AggregateOptions options)

      Copy constructor
      Parameters:
        `options` - the one to copy

    - #### AggregateOptions

          public AggregateOptions(JsonObject options)

      Constructor from JSON
      Parameters:
        `options` - the JSON

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Returns:
        the JSON

    - #### getMaxTime

          public long getMaxTime()

      Get the specified time limit in milliseconds for processing operations on a cursor. If you do not specify a value for maxTime, operations will not time out. A value of 0 explicitly specifies the default unbounded behavior.
      Returns:
        the specified time limit in milliseconds for processing operations on a cursor

    - #### setMaxTime

          public AggregateOptions setMaxTime(long maxTime)

      Set the time limit in milliseconds for processing operations on a cursor.
      Parameters:
        `maxTime` - the time limit in milliseconds for processing operations on a cursor
      Returns:
        reference to this, for fluency

    - #### getBatchSize

          public int getBatchSize()

      Returns:
        the batch size for methods loading found data in batches

    - #### getAllowDiskUse

          public Boolean getAllowDiskUse()

      Get the flag if writing to temporary files is enabled. When set to true, aggregation operations can write data to the _tmp subdirectory in the dbPath directory.
      Returns:
        true if writing to temporary files is enabled.

    - #### setAllowDiskUse

          public AggregateOptions setAllowDiskUse(Boolean allowDiskUse)

      Set the flag if writing to temporary files is enabled.
      Parameters:
        `allowDiskUse` - the flag indicating disk usage on aggregate or not.
      Returns:
        reference to this, for fluency

    - #### setBatchSize

          public AggregateOptions setBatchSize(int batchSize)

      Set the batch size for methods loading found data in batches.
      Parameters:
        `batchSize` - the number of documents in a batch
      Returns:
        reference to this, for fluency

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2021 Eclipse. All rights reserved.