Record Class ConsulCatalogEntry
java.lang.Object
java.lang.Record
io.micronaut.discovery.consul.client.v1.ConsulCatalogEntry
- Record Components:
node- Node IDaddress- Address as sent by Consul, a host name or an IP literal. It is not resolved.datacenter- DatacentertaggedAddresses- Tagged addressesnodeMetadata- Node metadataservice- Service
public record ConsulCatalogEntry(@Nullable String node, @Nullable String address, @Nullable String datacenter, @Nullable Map<String,String> taggedAddresses, @Nullable Map<String,String> nodeMetadata, @Nullable ConsulNewServiceEntry service)
extends Record
A catalog entry in Consul.
- Since:
- 4.1.0
- Author:
- Sergio del Amo
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConsulCatalogEntry(@Nullable String node, @Nullable String address, @Nullable String datacenter, @Nullable Map<String, String> taggedAddresses, @Nullable Map<String, String> nodeMetadata, @Nullable ConsulNewServiceEntry service) Creates an instance of aConsulCatalogEntryrecord class.ConsulCatalogEntry(@Nullable String node, @Nullable InetAddress address, @Nullable String datacenter, @Nullable Map<String, String> taggedAddresses, @Nullable Map<String, String> nodeMetadata, @Nullable ConsulNewServiceEntry service) Deprecated, for removal: This API element is subject to removal in a future version.Use the canonical constructor, which takes the address as a string. -
Method Summary
Modifier and TypeMethodDescription@Nullable Stringaddress()Returns the value of theaddressrecord component.@Nullable StringReturns the value of thedatacenterrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Stringnode()Returns the value of thenoderecord component.Returns the value of thenodeMetadatarecord component.@Nullable ConsulNewServiceEntryservice()Returns the value of theservicerecord component.Returns the value of thetaggedAddressesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConsulCatalogEntry
@Deprecated(since="5.2.0", forRemoval=true) public ConsulCatalogEntry(@Nullable String node, @Nullable InetAddress address, @Nullable String datacenter, @Nullable Map<String, String> taggedAddresses, @Nullable Map<String, String> nodeMetadata, @Nullable ConsulNewServiceEntry service) Deprecated, for removal: This API element is subject to removal in a future version.Use the canonical constructor, which takes the address as a string.Creates a catalog entry from anInetAddress. The address is stored as its host name, or as its IP literal when it has no host name.- Parameters:
node- Node IDaddress- Addressdatacenter- DatacentertaggedAddresses- Tagged addressesnodeMetadata- Node metadataservice- Service
-
ConsulCatalogEntry
public ConsulCatalogEntry(@Nullable String node, @Nullable String address, @Nullable String datacenter, @Nullable Map<String, String> taggedAddresses, @Nullable Map<String, String> nodeMetadata, @Nullable ConsulNewServiceEntry service) Creates an instance of aConsulCatalogEntryrecord class.- Parameters:
node- the value for thenoderecord componentaddress- the value for theaddressrecord componentdatacenter- the value for thedatacenterrecord componenttaggedAddresses- the value for thetaggedAddressesrecord componentnodeMetadata- the value for thenodeMetadatarecord componentservice- the value for theservicerecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
node
-
address
-
datacenter
Returns the value of thedatacenterrecord component.- Returns:
- the value of the
datacenterrecord component
-
taggedAddresses
Returns the value of thetaggedAddressesrecord component.- Returns:
- the value of the
taggedAddressesrecord component
-
nodeMetadata
Returns the value of thenodeMetadatarecord component.- Returns:
- the value of the
nodeMetadatarecord component
-
service
-