Record Class ConsulCatalogEntry
java.lang.Object
java.lang.Record
io.micronaut.discovery.consul.client.v1.ConsulCatalogEntry
- Record Components:
node
- Node IDaddress
- Addressdatacenter
- DatacentertaggedAddresses
- Tagged addressesnodeMetadata
- Node metadataservice
- Service
public record ConsulCatalogEntry(@Nullable String node, @Nullable InetAddress 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
ConstructorDescriptionConsulCatalogEntry
(@Nullable String node, @Nullable InetAddress address, @Nullable String datacenter, @Nullable Map<String, String> taggedAddresses, @Nullable Map<String, String> nodeMetadata, @Nullable ConsulNewServiceEntry service) Creates an instance of aConsulCatalogEntry
record class. -
Method Summary
Modifier and TypeMethodDescription@Nullable InetAddress
address()
Returns the value of theaddress
record component.@Nullable String
Returns the value of thedatacenter
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@Nullable String
node()
Returns the value of thenode
record component.Returns the value of thenodeMetadata
record component.@Nullable ConsulNewServiceEntry
service()
Returns the value of theservice
record component.Returns the value of thetaggedAddresses
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ConsulCatalogEntry
public ConsulCatalogEntry(@Nullable @Nullable String node, @Nullable @Nullable InetAddress address, @Nullable @Nullable String datacenter, @Nullable @Nullable Map<String, String> taggedAddresses, @Nullable @Nullable Map<String, String> nodeMetadata, @Nullable @Nullable ConsulNewServiceEntry service) Creates an instance of aConsulCatalogEntry
record class.- Parameters:
node
- the value for thenode
record componentaddress
- the value for theaddress
record componentdatacenter
- the value for thedatacenter
record componenttaggedAddresses
- the value for thetaggedAddresses
record componentnodeMetadata
- the value for thenodeMetadata
record componentservice
- the value for theservice
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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
Returns the value of thenode
record component.- Returns:
- the value of the
node
record component
-
address
Returns the value of theaddress
record component.- Returns:
- the value of the
address
record component
-
datacenter
Returns the value of thedatacenter
record component.- Returns:
- the value of the
datacenter
record component
-
taggedAddresses
Returns the value of thetaggedAddresses
record component.- Returns:
- the value of the
taggedAddresses
record component
-
nodeMetadata
Returns the value of thenodeMetadata
record component.- Returns:
- the value of the
nodeMetadata
record component
-
service
Returns the value of theservice
record component.- Returns:
- the value of the
service
record component
-