Class DefaultEurekaClientConfig
- java.lang.Object
-
- com.netflix.discovery.DefaultEurekaClientConfig
-
- All Implemented Interfaces:
EurekaClientConfig
@Singleton public class DefaultEurekaClientConfig extends java.lang.Object implements EurekaClientConfig
A default implementation of eureka client configuration as required byEurekaClientConfig.The information required for configuring eureka client is provided in a configuration file.The configuration file is searched for in the classpath with the name specified by the property eureka.client.props and with the suffix .properties. If the property is not specified, eureka-client.properties is assumed as the default.The properties that are looked up uses the namespace passed on to this class.
If the eureka.environment property is specified, additionally eureka-client-
.properties is loaded in addition to eureka-client.properties.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_NAMESPACEDeprecated.2016-08-29 useCommonConstants.DEFAULT_CONFIG_NAMESPACEstatic java.lang.StringDEFAULT_ZONEstatic java.lang.StringURL_SEPARATOR
-
Constructor Summary
Constructors Constructor Description DefaultEurekaClientConfig()DefaultEurekaClientConfig(java.lang.String namespace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowRedirects()Indicates whether server can redirect a client request to a backup server/cluster.java.lang.StringfetchRegistryForRemoteRegions()Comma separated list of regions for which the eureka registry information will be fetched.java.lang.String[]getAvailabilityZones(java.lang.String region)Gets the list of availability zones (used in AWS data centers) for the region in which this instance resides.java.lang.StringgetBackupRegistryImpl()Gets the name of the implementation which implementsBackupRegistryto fetch the registry information as a fall back option for only the first time when the eureka client starts.intgetCacheRefreshExecutorExponentialBackOffBound()Cache refresh executor exponential back off related property.intgetCacheRefreshExecutorThreadPoolSize()(non-Javadoc)java.lang.StringgetClientDataAccept()java.lang.StringgetDecoderName()This is a transient config and once the latest codecs are stable, can be removed (as there will only be one)java.lang.StringgetDollarReplacement()Get a replacement string for Dollar sign$during serializing/deserializing information in eureka server.java.lang.StringgetEncoderName()This is a transient config and once the latest codecs are stable, can be removed (as there will only be one)java.lang.StringgetEscapeCharReplacement()Get a replacement string for underscore sign_during serializing/deserializing information in eureka server.intgetEurekaConnectionIdleTimeoutSeconds()Indicates how much time (in seconds) that the HTTP connections to eureka server can stay idle before it can be closed.intgetEurekaServerConnectTimeoutSeconds()Indicates how long to wait (in seconds) before a connection to eureka server needs to timeout.java.lang.StringgetEurekaServerDNSName()Gets the DNS name to be queried to get the list of eureka servers.This information is not required if the contract returns the service urls by implementingEurekaClientConfig.getEurekaServerServiceUrls(String).java.lang.StringgetEurekaServerPort()Gets the port to be used to construct the service url to contact eureka server when the list of eureka servers come from the DNS.This information is not required if the contract returns the service urls by implementingEurekaClientConfig.getEurekaServerServiceUrls(String).intgetEurekaServerReadTimeoutSeconds()Indicates how long to wait (in seconds) before a read from eureka server needs to timeout.java.util.List<java.lang.String>getEurekaServerServiceUrls(java.lang.String myZone)Gets the list of fully qualifiedURLs to communicate with eureka server.intgetEurekaServerTotalConnections()Gets the total number of connections that is allowed from eureka client to all eureka servers.intgetEurekaServerTotalConnectionsPerHost()Gets the total number of connections that is allowed from eureka client to a eureka server host.java.lang.StringgetEurekaServerURLContext()Gets the URL context to be used to construct the service url to contact eureka server when the list of eureka servers come from the DNS.This information is not required if the contract returns the service urls by implementingEurekaClientConfig.getEurekaServerServiceUrls(String).intgetEurekaServiceUrlPollIntervalSeconds()Indicates how often(in seconds) to poll for changes to eureka server information.java.lang.StringgetExperimental(java.lang.String name)To avoid configuration API pollution when trying new/experimental or features or for the migration process, the corresponding configuration can be put into experimental configuration section.intgetHeartbeatExecutorExponentialBackOffBound()Heartbeat executor exponential back off related property.intgetHeartbeatExecutorThreadPoolSize()(non-Javadoc)intgetInitialInstanceInfoReplicationIntervalSeconds()Indicates how long initially (in seconds) to replicate instance info to the eureka serverintgetInstanceInfoReplicationIntervalSeconds()Indicates how often(in seconds) to replicate instance changes to be replicated to the eureka server.java.lang.StringgetProxyHost()Gets the proxy host to eureka server if any.java.lang.StringgetProxyPassword()Gets the proxy password if any.java.lang.StringgetProxyPort()Gets the proxy port to eureka server if any.java.lang.StringgetProxyUserName()Gets the proxy user name if any.java.lang.StringgetRegion()Gets the region (used in AWS datacenters) where this instance resides.intgetRegistryFetchIntervalSeconds()Indicates how often(in seconds) to fetch the registry information from the eureka server.java.lang.StringgetRegistryRefreshSingleVipAddress()Indicates whether the client is only interested in the registry information for a single VIP.EurekaTransportConfiggetTransportConfig()For compatibility, return the transport layer config classbooleanshouldDisableDelta()Indicates whether the eureka client should disable fetching of delta and should rather resort to getting the full registry information.booleanshouldEnforceFetchRegistryAtInit()If set to true, theEurekaClientinitialization should throw an exception at constructor time if the initial fetch of eureka registry information from the remote servers is unsuccessful.booleanshouldEnforceRegistrationAtInit()If set to true, theEurekaClientinitialization should throw an exception at constructor time if an initial registration to the remote servers is unsuccessful.booleanshouldFetchRegistry()Indicates whether this client should fetch eureka registry information from eureka server.booleanshouldFilterOnlyUpInstances()Indicates whether to get the applications after filtering the applications for instances with onlyInstanceInfo.InstanceStatus.UPstates.booleanshouldGZipContent()Indicates whether the content fetched from eureka server has to be compressed whenever it is supported by the server.booleanshouldLogDeltaDiff()Indicates whether to log differences between the eureka server and the eureka client in terms of registry information.booleanshouldOnDemandUpdateStatusChange()If set to true, local status updates viaApplicationInfoManager.setInstanceStatus(com.netflix.appinfo.InstanceInfo.InstanceStatus)will trigger on-demand (but rate limited) register/updates to remote eureka serversbooleanshouldPreferSameZoneEureka()Indicates whether or not this instance should try to use the eureka server in the same zone for latency and/or other reason.booleanshouldRegisterWithEureka()Indicates whether or not this instance should register its information with eureka server for discovery by others.booleanshouldUnregisterOnShutdown()Indicates whether the client should explicitly unregister itself from the remote server on client shutdown.booleanshouldUseDnsForFetchingServiceUrls()Indicates whether the eureka client should use the DNS mechanism to fetch a list of eureka servers to talk to.
-
-
-
Field Detail
-
DEFAULT_NAMESPACE
@Deprecated public static final java.lang.String DEFAULT_NAMESPACE
Deprecated.2016-08-29 useCommonConstants.DEFAULT_CONFIG_NAMESPACE- See Also:
- Constant Field Values
-
DEFAULT_ZONE
public static final java.lang.String DEFAULT_ZONE
- See Also:
- Constant Field Values
-
URL_SEPARATOR
public static final java.lang.String URL_SEPARATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getRegistryFetchIntervalSeconds
public int getRegistryFetchIntervalSeconds()
Description copied from interface:EurekaClientConfigIndicates how often(in seconds) to fetch the registry information from the eureka server.- Specified by:
getRegistryFetchIntervalSecondsin interfaceEurekaClientConfig- Returns:
- the fetch interval in seconds.
-
getInstanceInfoReplicationIntervalSeconds
public int getInstanceInfoReplicationIntervalSeconds()
Description copied from interface:EurekaClientConfigIndicates how often(in seconds) to replicate instance changes to be replicated to the eureka server.- Specified by:
getInstanceInfoReplicationIntervalSecondsin interfaceEurekaClientConfig- Returns:
- the instance replication interval in seconds.
-
getInitialInstanceInfoReplicationIntervalSeconds
public int getInitialInstanceInfoReplicationIntervalSeconds()
Description copied from interface:EurekaClientConfigIndicates how long initially (in seconds) to replicate instance info to the eureka server- Specified by:
getInitialInstanceInfoReplicationIntervalSecondsin interfaceEurekaClientConfig
-
getEurekaServiceUrlPollIntervalSeconds
public int getEurekaServiceUrlPollIntervalSeconds()
Description copied from interface:EurekaClientConfigIndicates how often(in seconds) to poll for changes to eureka server information.Eureka servers could be added or removed and this setting controls how soon the eureka clients should know about it.
- Specified by:
getEurekaServiceUrlPollIntervalSecondsin interfaceEurekaClientConfig- Returns:
- the interval to poll for eureka service url changes.
-
getProxyHost
public java.lang.String getProxyHost()
Description copied from interface:EurekaClientConfigGets the proxy host to eureka server if any.- Specified by:
getProxyHostin interfaceEurekaClientConfig- Returns:
- the proxy host.
-
getProxyPort
public java.lang.String getProxyPort()
Description copied from interface:EurekaClientConfigGets the proxy port to eureka server if any.- Specified by:
getProxyPortin interfaceEurekaClientConfig- Returns:
- the proxy port.
-
getProxyUserName
public java.lang.String getProxyUserName()
Description copied from interface:EurekaClientConfigGets the proxy user name if any.- Specified by:
getProxyUserNamein interfaceEurekaClientConfig- Returns:
- the proxy user name.
-
getProxyPassword
public java.lang.String getProxyPassword()
Description copied from interface:EurekaClientConfigGets the proxy password if any.- Specified by:
getProxyPasswordin interfaceEurekaClientConfig- Returns:
- the proxy password.
-
shouldGZipContent
public boolean shouldGZipContent()
Description copied from interface:EurekaClientConfigIndicates whether the content fetched from eureka server has to be compressed whenever it is supported by the server. The registry information from the eureka server is compressed for optimum network traffic.- Specified by:
shouldGZipContentin interfaceEurekaClientConfig- Returns:
- true, if the content need to be compressed, false otherwise.
-
getEurekaServerReadTimeoutSeconds
public int getEurekaServerReadTimeoutSeconds()
Description copied from interface:EurekaClientConfigIndicates how long to wait (in seconds) before a read from eureka server needs to timeout.- Specified by:
getEurekaServerReadTimeoutSecondsin interfaceEurekaClientConfig- Returns:
- time in seconds before the read should timeout.
-
getEurekaServerConnectTimeoutSeconds
public int getEurekaServerConnectTimeoutSeconds()
Description copied from interface:EurekaClientConfigIndicates how long to wait (in seconds) before a connection to eureka server needs to timeout.Note that the connections in the client are pooled by
HttpClientand this setting affects the actual connection creation and also the wait time to get the connection from the pool.- Specified by:
getEurekaServerConnectTimeoutSecondsin interfaceEurekaClientConfig- Returns:
- time in seconds before the connections should timeout.
-
getBackupRegistryImpl
public java.lang.String getBackupRegistryImpl()
Description copied from interface:EurekaClientConfigGets the name of the implementation which implementsBackupRegistryto fetch the registry information as a fall back option for only the first time when the eureka client starts.This may be needed for applications which needs additional resiliency for registry information without which it cannot operate.
- Specified by:
getBackupRegistryImplin interfaceEurekaClientConfig- Returns:
- the class name which implements
BackupRegistry.
-
getEurekaServerTotalConnections
public int getEurekaServerTotalConnections()
Description copied from interface:EurekaClientConfigGets the total number of connections that is allowed from eureka client to all eureka servers.- Specified by:
getEurekaServerTotalConnectionsin interfaceEurekaClientConfig- Returns:
- total number of allowed connections from eureka client to all eureka servers.
-
getEurekaServerTotalConnectionsPerHost
public int getEurekaServerTotalConnectionsPerHost()
Description copied from interface:EurekaClientConfigGets the total number of connections that is allowed from eureka client to a eureka server host.- Specified by:
getEurekaServerTotalConnectionsPerHostin interfaceEurekaClientConfig- Returns:
- total number of allowed connections from eureka client to a eureka server.
-
getEurekaServerURLContext
public java.lang.String getEurekaServerURLContext()
Description copied from interface:EurekaClientConfigGets the URL context to be used to construct the service url to contact eureka server when the list of eureka servers come from the DNS.This information is not required if the contract returns the service urls by implementingEurekaClientConfig.getEurekaServerServiceUrls(String).The DNS mechanism is used when
EurekaClientConfig.shouldUseDnsForFetchingServiceUrls()is set to true and the eureka client expects the DNS to configured a certain way so that it can fetch changing eureka servers dynamically.The changes are effective at runtime.
- Specified by:
getEurekaServerURLContextin interfaceEurekaClientConfig- Returns:
- the string indicating the context
URIof the eureka server.
-
getEurekaServerPort
public java.lang.String getEurekaServerPort()
Description copied from interface:EurekaClientConfigGets the port to be used to construct the service url to contact eureka server when the list of eureka servers come from the DNS.This information is not required if the contract returns the service urls by implementingEurekaClientConfig.getEurekaServerServiceUrls(String).The DNS mechanism is used when
EurekaClientConfig.shouldUseDnsForFetchingServiceUrls()is set to true and the eureka client expects the DNS to configured a certain way so that it can fetch changing eureka servers dynamically.The changes are effective at runtime.
- Specified by:
getEurekaServerPortin interfaceEurekaClientConfig- Returns:
- the string indicating the port where the eureka server is listening.
-
getEurekaServerDNSName
public java.lang.String getEurekaServerDNSName()
Description copied from interface:EurekaClientConfigGets the DNS name to be queried to get the list of eureka servers.This information is not required if the contract returns the service urls by implementingEurekaClientConfig.getEurekaServerServiceUrls(String).The DNS mechanism is used when
EurekaClientConfig.shouldUseDnsForFetchingServiceUrls()is set to true and the eureka client expects the DNS to configured a certain way so that it can fetch changing eureka servers dynamically.The changes are effective at runtime.
- Specified by:
getEurekaServerDNSNamein interfaceEurekaClientConfig- Returns:
- the string indicating the DNS name to be queried for eureka servers.
-
shouldUseDnsForFetchingServiceUrls
public boolean shouldUseDnsForFetchingServiceUrls()
Description copied from interface:EurekaClientConfigIndicates whether the eureka client should use the DNS mechanism to fetch a list of eureka servers to talk to. When the DNS name is updated to have additional servers, that information is used immediately after the eureka client polls for that information as specified inEurekaClientConfig.getEurekaServiceUrlPollIntervalSeconds().Alternatively, the service urls can be returned
EurekaClientConfig.getEurekaServerServiceUrls(String), but the users should implement their own mechanism to return the updated list in case of changes.The changes are effective at runtime.
- Specified by:
shouldUseDnsForFetchingServiceUrlsin interfaceEurekaClientConfig- Returns:
- true if the DNS mechanism should be used for fetching urls, false otherwise.
-
shouldRegisterWithEureka
public boolean shouldRegisterWithEureka()
Description copied from interface:EurekaClientConfigIndicates whether or not this instance should register its information with eureka server for discovery by others.In some cases, you do not want your instances to be discovered whereas you just want do discover other instances.
- Specified by:
shouldRegisterWithEurekain interfaceEurekaClientConfig- Returns:
- true if this instance should register with eureka, false otherwise
-
shouldUnregisterOnShutdown
public boolean shouldUnregisterOnShutdown()
Description copied from interface:EurekaClientConfigIndicates whether the client should explicitly unregister itself from the remote server on client shutdown.- Specified by:
shouldUnregisterOnShutdownin interfaceEurekaClientConfig- Returns:
- true if this instance should unregister with eureka on client shutdown, false otherwise
-
shouldPreferSameZoneEureka
public boolean shouldPreferSameZoneEureka()
Description copied from interface:EurekaClientConfigIndicates whether or not this instance should try to use the eureka server in the same zone for latency and/or other reason.Ideally eureka clients are configured to talk to servers in the same zone
The changes are effective at runtime at the next registry fetch cycle as specified by
EurekaClientConfig.getRegistryFetchIntervalSeconds()- Specified by:
shouldPreferSameZoneEurekain interfaceEurekaClientConfig- Returns:
- true if the eureka client should prefer the server in the same zone, false otherwise.
-
allowRedirects
public boolean allowRedirects()
Description copied from interface:EurekaClientConfigIndicates whether server can redirect a client request to a backup server/cluster. If set to false, the server will handle the request directly, If set to true, it may send HTTP redirect to the client, with a new server location.- Specified by:
allowRedirectsin interfaceEurekaClientConfig- Returns:
- true if HTTP redirects are allowed
-
shouldLogDeltaDiff
public boolean shouldLogDeltaDiff()
Description copied from interface:EurekaClientConfigIndicates whether to log differences between the eureka server and the eureka client in terms of registry information.Eureka client tries to retrieve only delta changes from eureka server to minimize network traffic. After receiving the deltas, eureka client reconciles the information from the server to verify it has not missed out some information. Reconciliation failures could happen when the client has had network issues communicating to server.If the reconciliation fails, eureka client gets the full registry information.
While getting the full registry information, the eureka client can log the differences between the client and the server and this setting controls that.
The changes are effective at runtime at the next registry fetch cycle as specified by
EurekaClientConfig.getRegistryFetchIntervalSeconds()- Specified by:
shouldLogDeltaDiffin interfaceEurekaClientConfig- Returns:
- true if the eureka client should log delta differences in the case of reconciliation failure.
-
shouldDisableDelta
public boolean shouldDisableDelta()
Description copied from interface:EurekaClientConfigIndicates whether the eureka client should disable fetching of delta and should rather resort to getting the full registry information.Note that the delta fetches can reduce the traffic tremendously, because the rate of change with the eureka server is normally much lower than the rate of fetches.
The changes are effective at runtime at the next registry fetch cycle as specified by
EurekaClientConfig.getRegistryFetchIntervalSeconds()- Specified by:
shouldDisableDeltain interfaceEurekaClientConfig- Returns:
- true to enable fetching delta information for registry, false to get the full registry.
-
fetchRegistryForRemoteRegions
@Nullable public java.lang.String fetchRegistryForRemoteRegions()
Description copied from interface:EurekaClientConfigComma separated list of regions for which the eureka registry information will be fetched. It is mandatory to define the availability zones for each of these regions as returned byEurekaClientConfig.getAvailabilityZones(String). Failing to do so, will result in failure of discovery client startup.- Specified by:
fetchRegistryForRemoteRegionsin interfaceEurekaClientConfig- Returns:
- Comma separated list of regions for which the eureka registry information will be fetched.
nullif no remote region has to be fetched.
-
getRegion
public java.lang.String getRegion()
Description copied from interface:EurekaClientConfigGets the region (used in AWS datacenters) where this instance resides.- Specified by:
getRegionin interfaceEurekaClientConfig- Returns:
- AWS region where this instance resides.
-
getAvailabilityZones
public java.lang.String[] getAvailabilityZones(java.lang.String region)
Description copied from interface:EurekaClientConfigGets the list of availability zones (used in AWS data centers) for the region in which this instance resides.The changes are effective at runtime at the next registry fetch cycle as specified by
EurekaClientConfig.getRegistryFetchIntervalSeconds()- Specified by:
getAvailabilityZonesin interfaceEurekaClientConfig- Parameters:
region- the region where this instance is deployed.- Returns:
- the list of available zones accessible by this instance.
-
getEurekaServerServiceUrls
public java.util.List<java.lang.String> getEurekaServerServiceUrls(java.lang.String myZone)
Description copied from interface:EurekaClientConfigGets the list of fully qualifiedURLs to communicate with eureka server.Typically the eureka server
URLs carry protocol,host,port,context and version information if any.Example: http://ec2-256-156-243-129.compute-1.amazonaws.com:7001/eureka/v2/The changes are effective at runtime at the next service url refresh cycle as specified by
EurekaClientConfig.getEurekaServiceUrlPollIntervalSeconds()- Specified by:
getEurekaServerServiceUrlsin interfaceEurekaClientConfig- Parameters:
myZone- the zone in which the instance is deployed.- Returns:
- the list of eureka server service urls for eureka clients to talk to.
-
shouldFilterOnlyUpInstances
public boolean shouldFilterOnlyUpInstances()
Description copied from interface:EurekaClientConfigIndicates whether to get the applications after filtering the applications for instances with onlyInstanceInfo.InstanceStatus.UPstates.The changes are effective at runtime at the next registry fetch cycle as specified by
EurekaClientConfig.getRegistryFetchIntervalSeconds()- Specified by:
shouldFilterOnlyUpInstancesin interfaceEurekaClientConfig- Returns:
- true to filter, false otherwise.
-
getEurekaConnectionIdleTimeoutSeconds
public int getEurekaConnectionIdleTimeoutSeconds()
Description copied from interface:EurekaClientConfigIndicates how much time (in seconds) that the HTTP connections to eureka server can stay idle before it can be closed.In the AWS environment, it is recommended that the values is 30 seconds or less, since the firewall cleans up the connection information after a few mins leaving the connection hanging in limbo
- Specified by:
getEurekaConnectionIdleTimeoutSecondsin interfaceEurekaClientConfig- Returns:
- time in seconds the connections to eureka can stay idle before it can be closed.
-
shouldFetchRegistry
public boolean shouldFetchRegistry()
Description copied from interface:EurekaClientConfigIndicates whether this client should fetch eureka registry information from eureka server.- Specified by:
shouldFetchRegistryin interfaceEurekaClientConfig- Returns:
trueif registry information has to be fetched,falseotherwise.
-
shouldEnforceFetchRegistryAtInit
public boolean shouldEnforceFetchRegistryAtInit()
Description copied from interface:EurekaClientConfigIf set to true, theEurekaClientinitialization should throw an exception at constructor time if the initial fetch of eureka registry information from the remote servers is unsuccessful. Note that ifEurekaClientConfig.shouldFetchRegistry()is set to false, then this config is a no-op.- Specified by:
shouldEnforceFetchRegistryAtInitin interfaceEurekaClientConfig- Returns:
- true or false for whether the client initialization should enforce an initial fetch.
-
getRegistryRefreshSingleVipAddress
public java.lang.String getRegistryRefreshSingleVipAddress()
Description copied from interface:EurekaClientConfigIndicates whether the client is only interested in the registry information for a single VIP.- Specified by:
getRegistryRefreshSingleVipAddressin interfaceEurekaClientConfig- Returns:
- the address of the VIP (name:port).
nullif single VIP interest is not present.
-
getHeartbeatExecutorThreadPoolSize
public int getHeartbeatExecutorThreadPoolSize()
(non-Javadoc)- Specified by:
getHeartbeatExecutorThreadPoolSizein interfaceEurekaClientConfig- Returns:
- the heartbeatExecutor thread pool size
- See Also:
EurekaClientConfig.getHeartbeatExecutorThreadPoolSize()
-
getHeartbeatExecutorExponentialBackOffBound
public int getHeartbeatExecutorExponentialBackOffBound()
Description copied from interface:EurekaClientConfigHeartbeat executor exponential back off related property. It is a maximum multiplier value for retry delay, in case where a sequence of timeouts occurred.- Specified by:
getHeartbeatExecutorExponentialBackOffBoundin interfaceEurekaClientConfig- Returns:
- maximum multiplier value for retry delay
-
getCacheRefreshExecutorThreadPoolSize
public int getCacheRefreshExecutorThreadPoolSize()
(non-Javadoc)- Specified by:
getCacheRefreshExecutorThreadPoolSizein interfaceEurekaClientConfig- Returns:
- the cacheRefreshExecutor thread pool size
- See Also:
EurekaClientConfig.getCacheRefreshExecutorThreadPoolSize()
-
getCacheRefreshExecutorExponentialBackOffBound
public int getCacheRefreshExecutorExponentialBackOffBound()
Description copied from interface:EurekaClientConfigCache refresh executor exponential back off related property. It is a maximum multiplier value for retry delay, in case where a sequence of timeouts occurred.- Specified by:
getCacheRefreshExecutorExponentialBackOffBoundin interfaceEurekaClientConfig- Returns:
- maximum multiplier value for retry delay
-
getDollarReplacement
public java.lang.String getDollarReplacement()
Description copied from interface:EurekaClientConfigGet a replacement string for Dollar sign$during serializing/deserializing information in eureka server.- Specified by:
getDollarReplacementin interfaceEurekaClientConfig- Returns:
- Replacement string for Dollar sign
$.
-
getEscapeCharReplacement
public java.lang.String getEscapeCharReplacement()
Description copied from interface:EurekaClientConfigGet a replacement string for underscore sign_during serializing/deserializing information in eureka server.- Specified by:
getEscapeCharReplacementin interfaceEurekaClientConfig- Returns:
- Replacement string for underscore sign
_.
-
shouldOnDemandUpdateStatusChange
public boolean shouldOnDemandUpdateStatusChange()
Description copied from interface:EurekaClientConfigIf set to true, local status updates viaApplicationInfoManager.setInstanceStatus(com.netflix.appinfo.InstanceInfo.InstanceStatus)will trigger on-demand (but rate limited) register/updates to remote eureka servers- Specified by:
shouldOnDemandUpdateStatusChangein interfaceEurekaClientConfig- Returns:
- true or false for whether local status updates should be updated to remote servers on-demand
-
shouldEnforceRegistrationAtInit
public boolean shouldEnforceRegistrationAtInit()
Description copied from interface:EurekaClientConfigIf set to true, theEurekaClientinitialization should throw an exception at constructor time if an initial registration to the remote servers is unsuccessful. Note that ifEurekaClientConfig.shouldRegisterWithEureka()is set to false, then this config is a no-op- Specified by:
shouldEnforceRegistrationAtInitin interfaceEurekaClientConfig- Returns:
- true or false for whether the client initialization should enforce an initial registration
-
getEncoderName
public java.lang.String getEncoderName()
Description copied from interface:EurekaClientConfigThis is a transient config and once the latest codecs are stable, can be removed (as there will only be one)- Specified by:
getEncoderNamein interfaceEurekaClientConfig- Returns:
- the class name of the encoding codec to use for the client. If none set a default codec will be used
-
getDecoderName
public java.lang.String getDecoderName()
Description copied from interface:EurekaClientConfigThis is a transient config and once the latest codecs are stable, can be removed (as there will only be one)- Specified by:
getDecoderNamein interfaceEurekaClientConfig- Returns:
- the class name of the decoding codec to use for the client. If none set a default codec will be used
-
getClientDataAccept
public java.lang.String getClientDataAccept()
- Specified by:
getClientDataAcceptin interfaceEurekaClientConfig- Returns:
Enum.name()for client data accept
-
getExperimental
public java.lang.String getExperimental(java.lang.String name)
Description copied from interface:EurekaClientConfigTo avoid configuration API pollution when trying new/experimental or features or for the migration process, the corresponding configuration can be put into experimental configuration section. Config format is: eureka.experimental.freeFormConfigString- Specified by:
getExperimentalin interfaceEurekaClientConfig- Returns:
- a property of experimental feature
-
getTransportConfig
public EurekaTransportConfig getTransportConfig()
Description copied from interface:EurekaClientConfigFor compatibility, return the transport layer config class- Specified by:
getTransportConfigin interfaceEurekaClientConfig- Returns:
- an instance of
EurekaTransportConfig
-
-