com.netflix.appinfo
Class CloudInstanceConfig
java.lang.Object
com.netflix.appinfo.AbstractInstanceConfig
com.netflix.appinfo.PropertiesInstanceConfig
com.netflix.appinfo.CloudInstanceConfig
- All Implemented Interfaces:
- EurekaInstanceConfig
public class CloudInstanceConfig
- extends PropertiesInstanceConfig
An InstanceInfo configuration for AWS cloud deployments.
The information required for registration with eureka by a combination of
user-supplied values as well as querying AWS instance metadata.An utility
class AmazonInfo helps in retrieving AWS specific values. Some of
that information including availability zone is used for determining
which eureka server to communicate to.
|
Method Summary |
DataCenterInfo |
getDataCenterInfo()
Returns the data center this instance is deployed. |
java.lang.String |
getHostName(boolean refresh)
Gets the hostname associated with this instance. |
void |
refreshAmazonInfo()
Refresh instance info - currently only used when in AWS cloud
as a public ip can change whenever an EIP is associated or dissociated. |
| Methods inherited from class com.netflix.appinfo.PropertiesInstanceConfig |
getAppname, getASGName, getHealthCheckUrl, getHealthCheckUrlPath, getHomePageUrl, getHomePageUrlPath, getIpAddress, getLeaseExpirationDurationInSeconds, getLeaseRenewalIntervalInSeconds, getMetadataMap, getNamespace, getNonSecurePort, getSecureHealthCheckUrl, getSecurePort, getSecurePortEnabled, getSecureVirtualHostName, getStatusPageUrl, getStatusPageUrlPath, getVirtualHostName, isInstanceEnabledOnit, isNonSecurePortEnabled |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CloudInstanceConfig
public CloudInstanceConfig()
CloudInstanceConfig
public CloudInstanceConfig(java.lang.String namespace)
getHostName
public java.lang.String getHostName(boolean refresh)
- Description copied from interface:
EurekaInstanceConfig
- Gets the hostname associated with this instance. This is the exact name
that would be used by other instances to make calls.
- Specified by:
getHostName in interface EurekaInstanceConfig- Overrides:
getHostName in class AbstractInstanceConfig
- Parameters:
refresh - true if the information needs to be refetched, false
otherwise.
- Returns:
- hostname of this instance which is identifiable by other
instances for making remote calls.
getDataCenterInfo
public DataCenterInfo getDataCenterInfo()
- Description copied from interface:
EurekaInstanceConfig
- Returns the data center this instance is deployed. This information is
used to get some AWS specific instance information if the instance is
deployed in AWS.
- Specified by:
getDataCenterInfo in interface EurekaInstanceConfig- Overrides:
getDataCenterInfo in class AbstractInstanceConfig
- Returns:
- information that indicates which data center this instance is
deployed in.
refreshAmazonInfo
public void refreshAmazonInfo()
- Refresh instance info - currently only used when in AWS cloud
as a public ip can change whenever an EIP is associated or dissociated.