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 and Description
    `DcCoordinates()` Default constructor
    `DcCoordinates(JsonObject coords)` Constructor from JSON

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getDatacenter()` Get datacenter
    `List<Coordinate>` | `getServers()` Get list of servers in datacenter
    `DcCoordinates` | `setDatacenter(String dc)` Set datacenter
    `DcCoordinates` | `setServers(List<Coordinate> servers)` Set list of servers in datacenter
    `JsonObject` | `toJson()` Convert to JSON

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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

Copyright © 2024 Eclipse. All rights reserved.