io.vertx.ext.consul

## Class BlockingQueryOptions

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

-     public class BlockingQueryOptions
      extends Object

  Options used to perform blocking query that used to wait for a potential change using long polling.
  Author:
    Ruslan Sennov
  See Also:
    Blocking Queries documentation

- - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getIndex()` Get index
    `String` | `getWait()` Get wait period
    `BlockingQueryOptions` | `setIndex(long index)` Set index indicating that the client wishes to wait for any changes subsequent to that index.
    `BlockingQueryOptions` | `setWait(String wait)` Specifying a maximum duration for the blocking request.
    `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

    - #### BlockingQueryOptions

          public BlockingQueryOptions()

      Default constructor

    - #### BlockingQueryOptions

          public BlockingQueryOptions(BlockingQueryOptions options)

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

    - #### BlockingQueryOptions

          public BlockingQueryOptions(JsonObject options)

      Constructor from JSON
      Parameters:
        `options` - the JSON

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Returns:
        the JSON

    - #### getIndex

          public long getIndex()

      Get index
      Returns:
        the index

    - #### setIndex

          public BlockingQueryOptions setIndex(long index)

      Set index indicating that the client wishes to wait for any changes subsequent to that index.
      Parameters:
        `index` - the index
      Returns:
        reference to this, for fluency

    - #### getWait

          public String getWait()

      Get wait period
      Returns:
        wait period

    - #### setWait

          public BlockingQueryOptions setWait(String wait)

      Specifying a maximum duration for the blocking request. This is limited to 10 minutes. If not set, the wait time defaults to 5 minutes. This value can be specified in the form of "10s" or "5m" (i.e., 10 seconds or 5 minutes, respectively).
      Parameters:
        `wait` - wait period
      Returns:
        reference to this, for fluency

Copyright © 2023 Eclipse. All rights reserved.