public interface ServiceInstance extends Serializable
| Modifier and Type | Method and Description |
|---|---|
String |
getAddress() |
Map<String,String> |
getAllParams() |
ApplicationModel |
getApplicationModel() |
String |
getExtendParam(String key) |
Map<String,String> |
getExtendParams() |
String |
getHost()
The hostname of the registered service instance.
|
Map<String,String> |
getMetadata()
The key / value pair metadata associated with the service instance.
|
default String |
getMetadata(String name)
Get the value of metadata by the specified name
|
default String |
getMetadata(String name,
String defaultValue)
Get the value of metadata by the specified name
|
default ApplicationModel |
getOrDefaultApplicationModel() |
int |
getPort()
The port of the registered service instance.
|
String |
getRegistryCluster() |
MetadataInfo |
getServiceMetadata() |
String |
getServiceName()
The name of service that current instance belongs to.
|
SortedMap<String,String> |
getSortedMetadata() |
default boolean |
isEnabled()
The enabled status of the registered service instance.
|
default boolean |
isHealthy()
The registered service instance is health or not.
|
String |
putExtendParam(String key,
String value) |
String |
putExtendParamIfAbsent(String key,
String value) |
String |
removeExtendParam(String key) |
void |
setApplicationModel(ApplicationModel applicationModel) |
void |
setRegistryCluster(String registryCluster) |
void |
setServiceMetadata(MetadataInfo serviceMetadata) |
InstanceAddressURL |
toURL(String protocol) |
String getServiceName()
String getHost()
int getPort()
String getAddress()
default boolean isEnabled()
true, indicates current instance is enabled, or disable, the client should remove this one.
The default value is truedefault boolean isHealthy()
true, indicates current instance is healthy, or unhealthy, the client may ignore this one.
The default value is trueMap<String,String> getMetadata()
MapString getRegistryCluster()
void setRegistryCluster(String registryCluster)
void setApplicationModel(ApplicationModel applicationModel)
ApplicationModel getApplicationModel()
default ApplicationModel getOrDefaultApplicationModel()
default String getMetadata(String name)
name - the specified namenulldefault String getMetadata(String name, String defaultValue)
name - the specified namedefaultValueMetadataInfo getServiceMetadata()
void setServiceMetadata(MetadataInfo serviceMetadata)
InstanceAddressURL toURL(String protocol)
Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.