Package com.netflix.appinfo
Interface AmazonInfoConfig
-
- All Known Implementing Classes:
Archaius1AmazonInfoConfig
public interface AmazonInfoConfigConfig related to loading of amazon metadata from the EC2 metadata url.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetConnectTimeout()java.lang.StringgetNamespace()intgetNumRetries()intgetReadTimeout()booleanshouldFailFastOnFirstLoad()When creating an AmazonInfo viaAmazonInfo.Builder.autoBuild(String), a fail fast mechanism exist based on the below configuration.booleanshouldLogAmazonMetadataErrors()booleanshouldValidateInstanceId()When AmazonInfo is specified, setting this to false allows progress on building the AmazonInfo even if the instanceId of the environment is not able to be validated.
-
-
-
Method Detail
-
getNamespace
java.lang.String getNamespace()
- Returns:
- the config namespace
-
shouldLogAmazonMetadataErrors
boolean shouldLogAmazonMetadataErrors()
- Returns:
- whether errors reading from the ec2 metadata url should be logged
-
getReadTimeout
int getReadTimeout()
- Returns:
- the read timeout when connecting to the metadata url
-
getConnectTimeout
int getConnectTimeout()
- Returns:
- the connect timeout when connecting to the metadata url
-
getNumRetries
int getNumRetries()
- Returns:
- the number of retries when unable to read a value from the metadata url
-
shouldFailFastOnFirstLoad
boolean shouldFailFastOnFirstLoad()
When creating an AmazonInfo viaAmazonInfo.Builder.autoBuild(String), a fail fast mechanism exist based on the below configuration. If enabled (default to true), theAmazonInfo.Builder.autoBuild(String)method will exit early after failing to load the value for the first metadata key (instanceId), after the expected number of retries as defined bygetNumRetries().- Returns:
- whether autoloading should fail fast if loading has failed for the first field (after all retries)
-
shouldValidateInstanceId
boolean shouldValidateInstanceId()
When AmazonInfo is specified, setting this to false allows progress on building the AmazonInfo even if the instanceId of the environment is not able to be validated.- Returns:
- whether to progress with AmazonInfo construction if the instanceId cannot be validated.
-
-