Package io.vertx.core.spi.cluster
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 Summary
Constructors Constructor Description NodeInfo()NodeInfo(String host, int port, JsonObject metadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()Stringhost()JsonObjectmetadata()intport()intreadFromBuffer(int start, Buffer buffer)Method invoked when deserializing bytes to this instance.StringtoString()voidwriteToBuffer(Buffer buffer)Method invoked when serializing this instance.
-
-
-
Constructor Detail
-
NodeInfo
public NodeInfo()
-
NodeInfo
public NodeInfo(String host, int port, JsonObject metadata)
-
-
Method Detail
-
host
public String host()
-
port
public int port()
-
metadata
public JsonObject metadata()
-
writeToBuffer
public void writeToBuffer(Buffer buffer)
Description copied from interface:ClusterSerializableMethod invoked when serializing this instance.- Specified by:
writeToBufferin interfaceClusterSerializable- Parameters:
buffer- theBufferwhere the serialized bytes must be written to
-
readFromBuffer
public int readFromBuffer(int start, Buffer buffer)Description copied from interface:ClusterSerializableMethod invoked when deserializing bytes to this instance.- Specified by:
readFromBufferin interfaceClusterSerializable- Parameters:
start- the position where to start reading thebufferbuffer- theBufferwhere the serialized bytes must be read from- Returns:
- the position after the last serialized byte
-
-