Class NodeInfo

java.lang.Object
io.vertx.core.spi.cluster.NodeInfo
All Implemented Interfaces:
ClusterSerializable

public class NodeInfo extends Object implements ClusterSerializable
Details about a clustered Vert.x node.
Author:
Thomas Segismont
  • Constructor Details

    • NodeInfo

      public NodeInfo()
    • NodeInfo

      public NodeInfo(String host, int port, JsonObject metadata)
  • Method Details

    • host

      public String host()
    • port

      public int port()
    • metadata

      public JsonObject metadata()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • writeToBuffer

      public void writeToBuffer(Buffer buffer)
      Description copied from interface: ClusterSerializable
      Method invoked when serializing this instance.
      Specified by:
      writeToBuffer in interface ClusterSerializable
      Parameters:
      buffer - the Buffer where the serialized bytes must be written to
    • readFromBuffer

      public int readFromBuffer(int start, Buffer buffer)
      Description copied from interface: ClusterSerializable
      Method invoked when deserializing bytes to this instance.
      Specified by:
      readFromBuffer in interface ClusterSerializable
      Parameters:
      start - the position where to start reading the buffer
      buffer - the Buffer where the serialized bytes must be read from
      Returns:
      the position after the last serialized byte