|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.appinfo.AbstractInstanceConfig
public abstract class AbstractInstanceConfig
An abstract instance info configuration with some defaults to get the users started quickly.The users have to override only a few methods to register their instance with eureka server.
| Constructor Summary | |
|---|---|
protected |
AbstractInstanceConfig()
|
protected |
AbstractInstanceConfig(DataCenterInfo info)
|
| Method Summary | |
|---|---|
abstract java.lang.String |
getAppname()
Get the name of the application to be registered with eureka. |
java.lang.String |
getASGName()
Gets the AWS autoscaling group name associated with this
instance. |
DataCenterInfo |
getDataCenterInfo()
Returns the data center this instance is deployed. |
java.lang.String |
getHostName(boolean refresh)
Gets the hostname associated with this instance. |
java.lang.String |
getIpAddress()
Get the IPAdress of the instance. |
int |
getLeaseExpirationDurationInSeconds()
Indicates the time in seconds that the eureka server waits since it received the last heartbeat before it can remove this instance from its view and there by disallowing traffic to this instance. |
int |
getLeaseRenewalIntervalInSeconds()
Indicates how often (in seconds) the eureka client needs to send heartbeats to eureka server to indicate that it is still alive. |
java.util.Map<java.lang.String,java.lang.String> |
getMetadataMap()
Gets the metadata name/value pairs associated with this instance. |
int |
getNonSecurePort()
Get the non-secure port on which the instance should receive
traffic. |
int |
getSecurePort()
Get the Secure port on which the instance should receive
traffic. |
boolean |
getSecurePortEnabled()
Indicates whether the secure port should be enabled for
traffic or not. |
java.lang.String |
getSecureVirtualHostName()
Gets the secure virtual host name defined for this instance. |
java.lang.String |
getVirtualHostName()
Gets the virtual host name defined for this instance. |
boolean |
isInstanceEnabledOnit()
Indicates whether the instance should be enabled for taking traffic as soon as it is registered with eureka. |
boolean |
isNonSecurePortEnabled()
Indicates whether the non-secure port should be enabled for
traffic or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.netflix.appinfo.EurekaInstanceConfig |
|---|
getHealthCheckUrl, getHealthCheckUrlPath, getHomePageUrl, getHomePageUrlPath, getNamespace, getSecureHealthCheckUrl, getStatusPageUrl, getStatusPageUrlPath |
| Constructor Detail |
|---|
protected AbstractInstanceConfig()
protected AbstractInstanceConfig(DataCenterInfo info)
| Method Detail |
|---|
public abstract java.lang.String getAppname()
EurekaInstanceConfig
getAppname in interface EurekaInstanceConfigpublic boolean isInstanceEnabledOnit()
EurekaInstanceConfig
isInstanceEnabledOnit in interface EurekaInstanceConfigpublic int getNonSecurePort()
EurekaInstanceConfignon-secure port on which the instance should receive
traffic.
getNonSecurePort in interface EurekaInstanceConfigpublic int getSecurePort()
EurekaInstanceConfigSecure port on which the instance should receive
traffic.
getSecurePort in interface EurekaInstanceConfigpublic boolean isNonSecurePortEnabled()
EurekaInstanceConfignon-secure port should be enabled for
traffic or not.
isNonSecurePortEnabled in interface EurekaInstanceConfignon-secure port is enabled, false
otherwise.public boolean getSecurePortEnabled()
EurekaInstanceConfigsecure port should be enabled for
traffic or not.
getSecurePortEnabled in interface EurekaInstanceConfigsecure port is enabled, false otherwise.public int getLeaseRenewalIntervalInSeconds()
EurekaInstanceConfigEurekaInstanceConfig.getLeaseExpirationDurationInSeconds(), eureka server will remove
the instance from its view, there by disallowing traffic to this
instance.
Note that the instance could still not take traffic if it implements
HealthCheckCallback and then decides to make itself unavailable.
getLeaseRenewalIntervalInSeconds in interface EurekaInstanceConfigpublic int getLeaseExpirationDurationInSeconds()
EurekaInstanceConfig
Setting this value too long could mean that the traffic could be routed
to the instance even though the instance is not alive. Setting this value
too small could mean, the instance may be taken out of traffic because of
temporary network glitches.This value to be set to atleast higher than
the value specified in EurekaInstanceConfig.getLeaseRenewalIntervalInSeconds()
.
getLeaseExpirationDurationInSeconds in interface EurekaInstanceConfigpublic java.lang.String getVirtualHostName()
EurekaInstanceConfigThis is typically the way other instance would find this instance by using the virtual host name.Think of this as similar to the fully qualified domain name, that the users of your services will need to find this instance.
getVirtualHostName in interface EurekaInstanceConfigpublic java.lang.String getSecureVirtualHostName()
EurekaInstanceConfigThis is typically the way other instance would find this instance by using the secure virtual host name.Think of this as similar to the fully qualified domain name, that the users of your services will need to find this instance.
getSecureVirtualHostName in interface EurekaInstanceConfigpublic java.lang.String getASGName()
EurekaInstanceConfigAWS autoscaling group name associated with this
instance. This information is specifically used in an AWS environment to
automatically put an instance out of service after the instance is
launched and it has been disabled for traffic..
getASGName in interface EurekaInstanceConfigpublic java.lang.String getHostName(boolean refresh)
EurekaInstanceConfig
getHostName in interface EurekaInstanceConfigrefresh - true if the information needs to be refetched, false
otherwise.
public java.util.Map<java.lang.String,java.lang.String> getMetadataMap()
EurekaInstanceConfig
getMetadataMap in interface EurekaInstanceConfigpublic DataCenterInfo getDataCenterInfo()
EurekaInstanceConfig
getDataCenterInfo in interface EurekaInstanceConfigpublic java.lang.String getIpAddress()
EurekaInstanceConfigEurekaInstanceConfig.getHostName(boolean).
getIpAddress in interface EurekaInstanceConfig
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||