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

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

    • 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