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 String
getDatacenter()
Get datacenterList<Coordinate>
getServers()
Get list of servers in datacenterDcCoordinates
setDatacenter(String dc)
Set datacenterDcCoordinates
setServers(List<Coordinate> servers)
Set list of servers in datacenterJsonObject
toJson()
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
-
-