Package 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 Description PreparedQueryExecuteOptions()Default constructorPreparedQueryExecuteOptions(JsonObject json)Constructor from JSON
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetLimit()Get the size of the list to the given number of nodes.StringgetNear()Get node name for sorting the list in ascending order based on the estimated round trip time from that node.PreparedQueryExecuteOptionssetLimit(int limit)Set the size of the list to the given number of nodes.PreparedQueryExecuteOptionssetNear(String near)Set node name for sorting the list in ascending order based on the estimated round trip time from that node.JsonObjecttoJson()Convert to JSON
-
-
-
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_agentwill 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
-
-