Package io.vertx.kafka.client.common

## Class Node

- java.lang.Object
- - io.vertx.kafka.client.common.Node

-     public class Node
      extends Object

  Information about a Kafka cluster node

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Node()` | Constructor
    `Node​(boolean hasRack, String host, int id, String idString, boolean isEmpty, int port, String rack)` | Constructor
    `Node​(JsonObject json)` | Constructor (from JSON representation)

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `getHost()` |
    `int` | `getId()` |
    `String` | `getIdString()` |
    `int` | `getPort()` |
    `boolean` | `hasRack()` |
    `boolean` | `isEmpty()` |
    `String` | `rack()` |
    `Node` | `setHasRack​(boolean hasRack)` | Set if this node has a defined rack
    `Node` | `setHost​(String host)` | Set the host name for this node
    `Node` | `setId​(int id)` | Set the node id of this node
    `Node` | `setIdString​(String idString)` | Set the string representation of the node id
    `Node` | `setIsEmpty​(boolean isEmpty)` | Set if this node is empty
    `Node` | `setPort​(int port)` | Set the port for this node
    `Node` | `setRack​(String rack)` | Set the rack for this node
    `JsonObject` | `toJson()` | Convert object to JSON representation
    `String` | `toString()` |

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

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

- - ### Constructor Detail

    - #### Node

          public Node()

      Constructor

    - #### Node

          public Node​(boolean hasRack,
                      String host,
                      int id,
                      String idString,
                      boolean isEmpty,
                      int port,
                      String rack)

      Constructor
      Parameters:
        `hasRack` - true if this node has a defined rack
        `host` - the host name for this node
        `id` - the node id of this node
        `idString` - String representation of the node id
        `isEmpty` - if this node is empty, which may be the case if noNode() is used as a placeholder in a response payload with an error
        `port` - the port for this node
        `rack` - the rack for this node

    - #### Node

          public Node​(JsonObject json)

      Constructor (from JSON representation)
      Parameters:
        `json` - JSON representation

  - ### Method Detail

    - #### hasRack

          public boolean hasRack()

      Returns:
        true if this node has a defined rack

    - #### setHasRack

          public Node setHasRack​(boolean hasRack)

      Set if this node has a defined rack
      Parameters:
        `hasRack` - if this node has a defined rack
      Returns:
        current instance of the class to be fluent

    - #### getHost

          public String getHost()

      Returns:
        the host name for this node

    - #### setHost

          public Node setHost​(String host)

      Set the host name for this node
      Parameters:
        `host` - the host name for this node
      Returns:
        current instance of the class to be fluent

    - #### getId

          public int getId()

      Returns:
        the node id of this node

    - #### setId

          public Node setId​(int id)

      Set the node id of this node
      Parameters:
        `id` - the node id of this node
      Returns:
        current instance of the class to be fluent

    - #### getIdString

          public String getIdString()

      Returns:
        String representation of the node id

    - #### setIdString

          public Node setIdString​(String idString)

      Set the string representation of the node id
      Parameters:
        `idString` - String representation of the node id
      Returns:
        current instance of the class to be fluent

    - #### isEmpty

          public boolean isEmpty()

      Returns:
        if this node is empty, which may be the case if noNode() is used as a placeholder in a response payload with an error

    - #### setIsEmpty

          public Node setIsEmpty​(boolean isEmpty)

      Set if this node is empty
      Parameters:
        `isEmpty` - if this node is empty
      Returns:
        current instance of the class to be fluent

    - #### getPort

          public int getPort()

      Returns:
        the port for this node

    - #### setPort

          public Node setPort​(int port)

      Set the port for this node
      Parameters:
        `port` - the port for this node
      Returns:
        current instance of the class to be fluent

    - #### rack

          public String rack()

      Returns:
        the rack for this node

    - #### setRack

          public Node setRack​(String rack)

      Set the rack for this node
      Parameters:
        `rack` - the rack for this node
      Returns:
        current instance of the class to be fluent

    - #### toJson

          public JsonObject toJson()

      Convert object to JSON representation
      Returns:
        JSON representation

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`