io.vertx.ext.consul

## Class PreparedQueryExecuteOptions

- java.lang.Object
- - io.vertx.ext.consul.PreparedQueryExecuteOptions

-     public class PreparedQueryExecuteOptions
      extends Object

  Options used to execute prepared query
  Author:
    Ruslan Sennov

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PreparedQueryExecuteOptions()` Default constructor
    `PreparedQueryExecuteOptions(JsonObject json)` Constructor from JSON

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getLimit()` Get the size of the list to the given number of nodes.
    `String` | `getNear()` Get node name for sorting the list in ascending order based on the estimated round trip time from that node.
    `PreparedQueryExecuteOptions` | `setLimit(int limit)` Set the size of the list to the given number of nodes.
    `PreparedQueryExecuteOptions` | `setNear(String near)` Set node name for sorting the list in ascending order based on the estimated round trip time from that node.
    `JsonObject` | `toJson()` Convert to JSON

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

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

- - ### Constructor Detail

    - #### PreparedQueryExecuteOptions

          public PreparedQueryExecuteOptions()

      Default constructor

    - #### PreparedQueryExecuteOptions

          public PreparedQueryExecuteOptions(JsonObject json)

      Constructor from JSON
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Returns:
        the JSON

    - #### getNear

          public String getNear()

      Get node name for sorting the list in ascending order based on the estimated round trip time from that node.
      Returns:
        the node name

    - #### setNear

          public PreparedQueryExecuteOptions setNear(String near)

      Set node name for sorting the list in ascending order based on the estimated round trip time from that node. Passing `_agent` will use the agent's node for the sort. If this is not present, the default behavior will shuffle the nodes randomly each time the query is executed.
      Parameters:
        `near` - the node name
      Returns:
        reference to this, for fluency

    - #### getLimit

          public int getLimit()

      Get the size of the list to the given number of nodes. This is applied after any sorting or shuffling.
      Returns:
        the size of the list to the given number of nodes

    - #### setLimit

          public PreparedQueryExecuteOptions setLimit(int limit)

      Set the size of the list to the given number of nodes. This is applied after any sorting or shuffling.
      Parameters:
        `limit` - the size of the list to the given number of nodes
      Returns:
        reference to this, for fluency

Copyright © 2024 Eclipse. All rights reserved.