Class DcCoordinates


  • public class DcCoordinates
    extends Object
    Holds coordinates of servers in datacenter
    Author:
    Ruslan Sennov
    • 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