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 Details

    • DEFAULT_BATCH_SIZE

      public static final int DEFAULT_BATCH_SIZE
      The default value of batchSize = 20.
      See Also:
    • DEFAULT_MAX_TIME

      public static final long DEFAULT_MAX_TIME
      The default value of maxTime = 0.
      See Also:
    • DEFAULT_MAX_AWAIT_TIME

      public static final long DEFAULT_MAX_AWAIT_TIME
      The default value of maxAwaitTime = 1000.
      See Also:
  • Constructor Details

    • 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 Details

    • getCollation

      public CollationOptions getCollation()
      Returns:
      Configured collationOptions
    • setCollation

      public AggregateOptions setCollation(CollationOptions collation)
      Optional.

      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.

      Parameters:
      collation -
      Returns:
      reference to this, for fluency
    • 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
    • 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
    • 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
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object