Package com.netflix.appinfo
Class Archaius1AmazonInfoConfig
- java.lang.Object
-
- com.netflix.appinfo.Archaius1AmazonInfoConfig
-
- All Implemented Interfaces:
AmazonInfoConfig
public class Archaius1AmazonInfoConfig extends java.lang.Object implements AmazonInfoConfig
-
-
Constructor Summary
Constructors Constructor Description Archaius1AmazonInfoConfig(java.lang.String namespace)
-
Method Summary
All Methods Instance Methods Concrete 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
public java.lang.String getNamespace()
- Specified by:
getNamespacein interfaceAmazonInfoConfig- Returns:
- the config namespace
-
shouldLogAmazonMetadataErrors
public boolean shouldLogAmazonMetadataErrors()
- Specified by:
shouldLogAmazonMetadataErrorsin interfaceAmazonInfoConfig- Returns:
- whether errors reading from the ec2 metadata url should be logged
-
getReadTimeout
public int getReadTimeout()
- Specified by:
getReadTimeoutin interfaceAmazonInfoConfig- Returns:
- the read timeout when connecting to the metadata url
-
getConnectTimeout
public int getConnectTimeout()
- Specified by:
getConnectTimeoutin interfaceAmazonInfoConfig- Returns:
- the connect timeout when connecting to the metadata url
-
getNumRetries
public int getNumRetries()
- Specified by:
getNumRetriesin interfaceAmazonInfoConfig- Returns:
- the number of retries when unable to read a value from the metadata url
-
shouldFailFastOnFirstLoad
public boolean shouldFailFastOnFirstLoad()
Description copied from interface:AmazonInfoConfigWhen 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 byAmazonInfoConfig.getNumRetries().- Specified by:
shouldFailFastOnFirstLoadin interfaceAmazonInfoConfig- Returns:
- whether autoloading should fail fast if loading has failed for the first field (after all retries)
-
shouldValidateInstanceId
public boolean shouldValidateInstanceId()
Description copied from interface:AmazonInfoConfigWhen 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.- Specified by:
shouldValidateInstanceIdin interfaceAmazonInfoConfig- Returns:
- whether to progress with AmazonInfo construction if the instanceId cannot be validated.
-
-