Package io.vertx.ext.consul
Class PreparedQueryExecuteResponse
- java.lang.Object
- 
- io.vertx.ext.consul.PreparedQueryExecuteResponse
 
- 
 public class PreparedQueryExecuteResponse extends Object The results of executing prepared query- Author:
- Ruslan Sennov
 
- 
- 
Constructor SummaryConstructors Constructor Description PreparedQueryExecuteResponse()Default constructorPreparedQueryExecuteResponse(JsonObject json)Constructor from JSON
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDc()Get the datacenter that ultimately provided the list of nodesStringgetDnsTtl()Get the TTL duration when query results are served over DNS.intgetFailovers()Get the number of remote datacenters that were queried while executing the query.List<ServiceEntry>getNodes()Get the list of healthy nodes providing the given service, as specified by the constraints of the prepared query.StringgetService()Get the service name that the query was selecting.PreparedQueryExecuteResponsesetDc(String dc)Set the datacenter that ultimately provided the list of nodesPreparedQueryExecuteResponsesetDnsTtl(String dnsTtl)Set the TTL duration when query results are served over DNS.PreparedQueryExecuteResponsesetFailovers(int failovers)Set the number of remote datacenters that were queried while executing the query.PreparedQueryExecuteResponsesetNodes(List<ServiceEntry> nodes)Set the list of healthy nodes providing the given service, as specified by the constraints of the prepared query.PreparedQueryExecuteResponsesetService(String service)Set the service name that the query was selecting.JsonObjecttoJson()Convert to JSON
 
- 
- 
- 
Constructor Detail- 
PreparedQueryExecuteResponsepublic PreparedQueryExecuteResponse() Default constructor
 - 
PreparedQueryExecuteResponsepublic PreparedQueryExecuteResponse(JsonObject json) Constructor from JSON- Parameters:
- json- the JSON
 
 
- 
 - 
Method Detail- 
toJsonpublic JsonObject toJson() Convert to JSON- Returns:
- the JSON
 
 - 
getServicepublic String getService() Get the service name that the query was selecting. This is useful for context in case an empty list of nodes is returned.- Returns:
- the service name that the query was selecting.
 
 - 
setServicepublic PreparedQueryExecuteResponse setService(String service) Set the service name that the query was selecting. This is useful for context in case an empty list of nodes is returned.- Parameters:
- service- the service name that the query was selecting.
- Returns:
- reference to this, for fluency
 
 - 
getDcpublic String getDc() Get the datacenter that ultimately provided the list of nodes- Returns:
- the datacenter that ultimately provided the list of nodes
 
 - 
setDcpublic PreparedQueryExecuteResponse setDc(String dc) Set the datacenter that ultimately provided the list of nodes- Parameters:
- dc- the datacenter that ultimately provided the list of nodes
- Returns:
- reference to this, for fluency
 
 - 
getDnsTtlpublic String getDnsTtl() Get the TTL duration when query results are served over DNS. If this is specified, it will take precedence over any Consul agent-specific configuration.- Returns:
- the TTL duration
 
 - 
setDnsTtlpublic PreparedQueryExecuteResponse setDnsTtl(String dnsTtl) Set the TTL duration when query results are served over DNS. If this is specified, it will take precedence over any Consul agent-specific configuration.- Parameters:
- dnsTtl- the TTL duration
- Returns:
- reference to this, for fluency
 
 - 
getFailoverspublic int getFailovers() Get the number of remote datacenters that were queried while executing the query.- Returns:
- the number of remote datacenters that were queried while executing the query.
 
 - 
setFailoverspublic PreparedQueryExecuteResponse setFailovers(int failovers) Set the number of remote datacenters that were queried while executing the query.- Parameters:
- failovers- the number of remote datacenters that were queried while executing the query.
- Returns:
- reference to this, for fluency
 
 - 
getNodespublic List<ServiceEntry> getNodes() Get the list of healthy nodes providing the given service, as specified by the constraints of the prepared query.- Returns:
- the list of healthy nodes providing the given service, as specified by the constraints of the prepared query.
 
 - 
setNodespublic PreparedQueryExecuteResponse setNodes(List<ServiceEntry> nodes) Set the list of healthy nodes providing the given service, as specified by the constraints of the prepared query.- Parameters:
- nodes- the list of healthy nodes providing the given service, as specified by the constraints of the prepared query.
- Returns:
- reference to this, for fluency
 
 
- 
 
-