Record Class DefaultKubernetesServiceInstance
java.lang.Object
java.lang.Record
org.springframework.cloud.kubernetes.commons.discovery.DefaultKubernetesServiceInstance
- Record Components:
instanceId- the id of the instance.serviceId- the id of the service.host- the address where the service instance can be found.port- the port on which the service is running.metadata- a map containing metadata.secure- indicates whether the connection needs to be secure.namespace- the namespace of the service.cluster- the cluster the service resides in.
- All Implemented Interfaces:
Serializable, org.springframework.cloud.client.ServiceInstance, KubernetesServiceInstance
public record DefaultKubernetesServiceInstance(String instanceId, String serviceId, String host, int port, Map<String,String> metadata, boolean secure, String namespace, String cluster, Map<String, Map<String,String>> podMetadata)
extends Record
implements KubernetesServiceInstance, Serializable
- Author:
- wind57
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultKubernetesServiceInstance(String instanceId, String serviceId, String host, int port, Map<String, String> metadata, boolean secure, String namespace, String cluster, Map<String, Map<String, String>> podMetadata) Creates an instance of aDefaultKubernetesServiceInstancerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncluster()Returns the value of theclusterrecord component.final booleanIndicates whether some other object is "equal to" this one.getHost()intgetPort()getUri()final inthashCode()Returns a hash code value for this object.host()Returns the value of thehostrecord component.Returns the value of theinstanceIdrecord component.booleanisSecure()metadata()Returns the value of themetadatarecord component.Returns the value of thenamespacerecord component.Returns the value of thepodMetadatarecord component.intport()Returns the value of theportrecord component.booleansecure()Returns the value of thesecurerecord component.Returns the value of theserviceIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DefaultKubernetesServiceInstance
public DefaultKubernetesServiceInstance(String instanceId, String serviceId, String host, int port, Map<String, String> metadata, boolean secure, String namespace, String cluster, Map<String, Map<String, String>> podMetadata) Creates an instance of aDefaultKubernetesServiceInstancerecord class.- Parameters:
instanceId- the value for theinstanceIdrecord componentserviceId- the value for theserviceIdrecord componenthost- the value for thehostrecord componentport- the value for theportrecord componentmetadata- the value for themetadatarecord componentsecure- the value for thesecurerecord componentnamespace- the value for thenamespacerecord componentcluster- the value for theclusterrecord componentpodMetadata- the value for thepodMetadatarecord component
-
-
Method Details
-
getInstanceId
- Specified by:
getInstanceIdin interfaceorg.springframework.cloud.client.ServiceInstance
-
getServiceId
- Specified by:
getServiceIdin interfaceorg.springframework.cloud.client.ServiceInstance
-
getHost
- Specified by:
getHostin interfaceorg.springframework.cloud.client.ServiceInstance
-
getPort
public int getPort()- Specified by:
getPortin interfaceorg.springframework.cloud.client.ServiceInstance
-
isSecure
public boolean isSecure()- Specified by:
isSecurein interfaceorg.springframework.cloud.client.ServiceInstance
-
getUri
- Specified by:
getUriin interfaceorg.springframework.cloud.client.ServiceInstance
-
getMetadata
-
getScheme
- Specified by:
getSchemein interfaceorg.springframework.cloud.client.ServiceInstance
-
getNamespace
- Specified by:
getNamespacein interfaceKubernetesServiceInstance
-
getCluster
- Specified by:
getClusterin interfaceKubernetesServiceInstance
-
podMetadata
Returns the value of thepodMetadatarecord component.- Specified by:
podMetadatain interfaceKubernetesServiceInstance- Returns:
- the value of the
podMetadatarecord component
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
instanceId
Returns the value of theinstanceIdrecord component.- Returns:
- the value of the
instanceIdrecord component
-
serviceId
-
host
-
port
-
metadata
-
secure
-
namespace
-
cluster
-