@Serializer(value="com.netflix.discovery.converters.EntityBodyConverter") public class InstanceInfo extends java.lang.Object
@Auto annotated fields are serialized as is; Other fields are
serialized as specified by the @Serializer.
| Modifier and Type | Class and Description |
|---|---|
static class |
InstanceInfo.ActionType |
static class |
InstanceInfo.Builder |
static class |
InstanceInfo.InstanceStatus |
static class |
InstanceInfo.PortType |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_COUNTRY_ID |
static int |
DEFAULT_PORT |
static int |
DEFAULT_SECURE_PORT |
| Constructor and Description |
|---|
InstanceInfo(InstanceInfo ii)
shallow copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
InstanceInfo.ActionType |
getActionType()
Returns the type of action done on the instance in the server.Primarily
used for updating deltas in the
DiscoveryClient
instance. |
java.lang.String |
getAppGroupName() |
java.lang.String |
getAppName()
Return the name of the application registering with discovery.
|
java.lang.String |
getASGName()
Get AWS autoscaling group name if any.
|
int |
getCountryId()
Deprecated.
|
DataCenterInfo |
getDataCenterInfo()
Returns data center information identifying if it is AWS or not.
|
java.util.Set<java.lang.String> |
getHealthCheckUrls()
Gets the absolute URLs for the health check page for both secure and
non-secure protocols.
|
java.lang.String |
getHomePageUrl()
Gets the home page
URL set for this instance. |
java.lang.String |
getHostName()
Returns the fully qualified hostname of this running instance.
|
java.lang.String |
getId()
Returns the unique id of the instance.
|
java.lang.String |
getIPAddr()
Returns the ip address of the instance.
|
java.lang.Long |
getLastDirtyTimestamp()
Gets the last time stamp when this instance was touched.
|
long |
getLastUpdatedTimestamp()
Returns the time elapsed since epoch since the instance status has been
last updated.
|
LeaseInfo |
getLeaseInfo()
Returns the lease information regarding when it expires.
|
java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
Returns all application specific metadata set on the instance.
|
InstanceInfo.InstanceStatus |
getOverriddenStatus()
Returns the overridden status if any of the instance.
|
int |
getPort()
Returns the port number that is used for servicing requests.
|
int |
getSecurePort()
Returns the secure port that is used for servicing requests.
|
java.lang.String |
getSecureVipAddress()
Get the Secure Virtual Internet Protocol address for this instance.
|
java.lang.String |
getSID()
Deprecated.
|
InstanceInfo.InstanceStatus |
getStatus()
Returns the status of the instance.
|
java.lang.String |
getStatusPageUrl()
Gets the status page
URL set for this instance. |
java.lang.String |
getVersion()
Deprecated.
|
java.lang.String |
getVIPAddress()
Gets the Virtual Internet Protocol address for this instance.
|
int |
hashCode() |
java.lang.Boolean |
isCoordinatingDiscoveryServer()
Finds if this instance is the coordinating discovery server.
|
boolean |
isDirty()
Returns whether any state changed so that
DiscoveryClient can
check whether to retransmit info or not on the next heartbeat. |
boolean |
isPortEnabled(InstanceInfo.PortType type)
Checks whether a port is enabled for traffic or not.
|
void |
setActionType(InstanceInfo.ActionType actionType)
Set the action type performed on this instance in the server.
|
void |
setIsCoordinatingDiscoveryServer()
Sets a flag if this instance is the same as the discovery server that is
return the instances.
|
void |
setIsDirty(boolean b)
Sets the dirty flag so that the instance information can be carried to
the discovery server on the next heartbeat.
|
void |
setLastDirtyTimestamp(java.lang.Long lastDirtyTimestamp)
Set the time indicating that the instance was touched.
|
void |
setLastUpdatedTimestamp()
Set the update time for this instance when the status was update.
|
void |
setLeaseInfo(LeaseInfo info)
Sets the lease information regarding when it expires.
|
void |
setOverriddenStatus(InstanceInfo.InstanceStatus status)
Sets the overridden status for this instance.Normally set by an external
process to disable instance from taking traffic.
|
void |
setSID(java.lang.String sid)
Deprecated.
|
void |
setStatus(InstanceInfo.InstanceStatus status)
Set the status for this instance.
|
void |
setStatusWithoutDirty(InstanceInfo.InstanceStatus status)
Set the status for this instance without updating the dirty timestamp.
|
public static final int DEFAULT_PORT
public static final int DEFAULT_SECURE_PORT
public static final int DEFAULT_COUNTRY_ID
public InstanceInfo(InstanceInfo ii)
ii - The object to copypublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String getAppName()
public java.lang.String getAppGroupName()
public java.lang.String getHostName()
@Deprecated public void setSID(java.lang.String sid)
@Deprecated public java.lang.String getSID()
public java.lang.String getId()
public java.lang.String getIPAddr()
public int getPort()
public InstanceInfo.InstanceStatus getStatus()
public InstanceInfo.InstanceStatus getOverriddenStatus()
public DataCenterInfo getDataCenterInfo()
public LeaseInfo getLeaseInfo()
public void setLeaseInfo(LeaseInfo info)
info - the lease information of this instance.public java.util.Map<java.lang.String,java.lang.String> getMetadata()
@Deprecated public int getCountryId()
public int getSecurePort()
public boolean isPortEnabled(InstanceInfo.PortType type)
type - indicates whether it is secure or non-secure port.public long getLastUpdatedTimestamp()
public void setLastUpdatedTimestamp()
public java.lang.String getHomePageUrl()
URL set for this instance.URLpublic java.lang.String getStatusPageUrl()
URL set for this instance.URLpublic java.util.Set<java.lang.String> getHealthCheckUrls()
public java.lang.String getVIPAddress()
public java.lang.String getSecureVipAddress()
public java.lang.Long getLastDirtyTimestamp()
public void setLastDirtyTimestamp(java.lang.Long lastDirtyTimestamp)
lastDirtyTimestamp - time when the instance was touched.public void setStatus(InstanceInfo.InstanceStatus status)
status - status for this instance.public void setStatusWithoutDirty(InstanceInfo.InstanceStatus status)
status - status for this instance.public void setOverriddenStatus(InstanceInfo.InstanceStatus status)
status - overridden status for this instance.public boolean isDirty()
DiscoveryClient can
check whether to retransmit info or not on the next heartbeat.InstanceInfo is dirty, false otherwise.public void setIsDirty(boolean b)
b - - true if dirty, false otherwise.public void setIsCoordinatingDiscoveryServer()
public java.lang.Boolean isCoordinatingDiscoveryServer()
public InstanceInfo.ActionType getActionType()
DiscoveryClient
instance.public void setActionType(InstanceInfo.ActionType actionType)
actionType - action type done on the instance.public java.lang.String getASGName()
@Deprecated public java.lang.String getVersion()