Package io.vertx.ext.consul
Class DcCoordinates
- java.lang.Object
-
- io.vertx.ext.consul.DcCoordinates
-
public class DcCoordinates extends Object
Holds coordinates of servers in datacenter- Author:
- Ruslan Sennov
-
-
Constructor Summary
Constructors Constructor Description DcCoordinates()Default constructorDcCoordinates(JsonObject coords)Constructor from JSON
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDatacenter()Get datacenterList<Coordinate>getServers()Get list of servers in datacenterDcCoordinatessetDatacenter(String dc)Set datacenterDcCoordinatessetServers(List<Coordinate> servers)Set list of servers in datacenterJsonObjecttoJson()Convert to JSON
-
-
-
Constructor Detail
-
DcCoordinates
public DcCoordinates()
Default constructor
-
DcCoordinates
public DcCoordinates(JsonObject coords)
Constructor from JSON- Parameters:
coords- the JSON
-
-
Method Detail
-
toJson
public JsonObject toJson()
Convert to JSON- Returns:
- the JSON
-
getDatacenter
public String getDatacenter()
Get datacenter- Returns:
- datacenter
-
getServers
public List<Coordinate> getServers()
Get list of servers in datacenter- Returns:
- list of servers in datacenter
-
setDatacenter
public DcCoordinates setDatacenter(String dc)
Set datacenter- Parameters:
dc- the datacenter- Returns:
- reference to this, for fluency
-
setServers
public DcCoordinates setServers(List<Coordinate> servers)
Set list of servers in datacenter- Parameters:
servers- list of servers in datacenter- Returns:
- reference to this, for fluency
-
-