public interface ServiceInstance extends Serializable
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object another) |
String |
getAddress() |
Map<String,String> |
getAllParams() |
Map<String,String> |
getExtendParams() |
String |
getHost()
The hostname of the registered service instance.
|
String |
getId()
The id 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
|
Integer |
getPort()
The port of the registered service instance.
|
String |
getServiceName()
The name of service that current instance belongs to.
|
int |
hashCode() |
default boolean |
isEnabled()
The enable status of the registered service instance.
|
default boolean |
isHealthy()
The registered service instance is health or not.
|
InstanceAddressURL |
toURL() |
String getId()
String getServiceName()
String getHost()
Integer 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 enabled, or disable, the client may ignore this one.
The default value is trueMap<String,String> getMetadata()
Mapdefault String getMetadata(String name)
name - the specified namenulldefault String getMetadata(String name, String defaultValue)
name - the specified namedefaultValueboolean equals(Object another)
equals 在类中 Objectanother - another ServiceInstancetrue, or falseInstanceAddressURL toURL()
Copyright © 2011–2021 The Apache Software Foundation. All rights reserved.