Class MemberEntry
java.lang.Object
io.micronaut.discovery.consul.client.v1.MemberEntry
A member entry of a Consul cluster. See https://www.consul.io/api/agent.html
- Author:
- Álvaro Sánchez-Mariscal
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.getName()getPort()getTags()voidsetAddress(InetAddress address) Sets the address, stored as its host name, or as its IP literal when it has no host name.voidsetHostString(String hostString) voidvoidvoidvoid
-
Constructor Details
-
MemberEntry
public MemberEntry()
-
-
Method Details
-
getName
- Returns:
- The name of this memeber
-
setName
- Parameters:
name- Name of this member
-
getHostString
- Returns:
- The address of this member as sent by Consul, a host name or an IP literal. It is not resolved.
- Since:
- 5.2.0
-
setHostString
- Parameters:
hostString- The address of this member, a host name or an IP literal- Since:
- 5.2.0
-
getAddress
Deprecated, for removal: This API element is subject to removal in a future version.UsegetHostString()and resolve the address where it is needed.The address is resolved on each call, which needs a DNS lookup when Consul sent a host name.- Returns:
- The resolved
InetAddressof this member, ornullif there is none - Throws:
UncheckedIOException- if the host name cannot be resolved
-
setAddress
Sets the address, stored as its host name, or as its IP literal when it has no host name.- Parameters:
address- TheInetAddressof this member
-
getPort
- Returns:
- The port this member is listening on
-
setPort
- Parameters:
port- Listening port
-
getTags
-
setTags
-
getStatus
- Returns:
- Status of this member
-
setStatus
- Parameters:
status- Status of this member
-
getHostString()and resolve the address where it is needed.