Class PreparedQueryExecuteOptions
java.lang.Object
io.vertx.ext.consul.PreparedQueryExecuteOptions
Options used to execute prepared query
- Author:
- Ruslan Sennov
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorConstructor from JSON -
Method Summary
Modifier and TypeMethodDescriptionintgetLimit()Get the size of the list to the given number of nodes.getNear()Get node name for sorting the list in ascending order based on the estimated round trip time from that node.setLimit(int limit) Set the size of the list to the given number of nodes.Set node name for sorting the list in ascending order based on the estimated round trip time from that node.toJson()Convert to JSON
-
Constructor Details
-
PreparedQueryExecuteOptions
public PreparedQueryExecuteOptions()Default constructor -
PreparedQueryExecuteOptions
Constructor from JSON- Parameters:
json- the JSON
-
-
Method Details
-
toJson
-
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
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
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
-