Class DefaultEurekaTransportConfig
- java.lang.Object
-
- com.netflix.discovery.shared.transport.DefaultEurekaTransportConfig
-
- All Implemented Interfaces:
EurekaTransportConfig
public class DefaultEurekaTransportConfig extends java.lang.Object implements EurekaTransportConfig
-
-
Constructor Summary
Constructors Constructor Description DefaultEurekaTransportConfig(java.lang.String parentNamespace, com.netflix.config.DynamicPropertyFactory configInstance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapplicationsResolverUseIp()By default, the applications resolver extracts the public hostname from internal InstanceInfos for resolutions.intgetApplicationsResolverDataStalenessThresholdSeconds()intgetAsyncExecutorThreadPoolSize()intgetAsyncResolverRefreshIntervalMs()intgetAsyncResolverWarmUpTimeoutMs()java.lang.StringgetBootstrapResolverStrategy()Can be used to specify different bootstrap resolve strategies.java.lang.StringgetReadClusterVip()The remote vipAddress of the eureka cluster (either the primaries or a readonly replica) to fetch registry data from.doublegetRetryableClientQuarantineRefreshPercentage()intgetSessionedClientReconnectIntervalSeconds()java.lang.StringgetWriteClusterVip()The remote vipAddress of the primary eureka cluster to register with.booleanuseBootstrapResolverForQuery()By default, the transport uses the same (bootstrap) resolver for queries.
-
-
-
Method Detail
-
getSessionedClientReconnectIntervalSeconds
public int getSessionedClientReconnectIntervalSeconds()
- Specified by:
getSessionedClientReconnectIntervalSecondsin interfaceEurekaTransportConfig- Returns:
- the reconnect inverval to use for sessioned clients
-
getRetryableClientQuarantineRefreshPercentage
public double getRetryableClientQuarantineRefreshPercentage()
- Specified by:
getRetryableClientQuarantineRefreshPercentagein interfaceEurekaTransportConfig- Returns:
- the percentage of the full endpoints set above which the quarantine set is cleared in the range [0, 1.0]
-
getApplicationsResolverDataStalenessThresholdSeconds
public int getApplicationsResolverDataStalenessThresholdSeconds()
- Specified by:
getApplicationsResolverDataStalenessThresholdSecondsin interfaceEurekaTransportConfig- Returns:
- the max staleness threshold tolerated by the applications resolver
-
applicationsResolverUseIp
public boolean applicationsResolverUseIp()
Description copied from interface:EurekaTransportConfigBy default, the applications resolver extracts the public hostname from internal InstanceInfos for resolutions. Set this to true to change this behaviour to use ip addresses instead (private ip if ip type can be determined).- Specified by:
applicationsResolverUseIpin interfaceEurekaTransportConfig- Returns:
- false by default
-
getAsyncResolverRefreshIntervalMs
public int getAsyncResolverRefreshIntervalMs()
- Specified by:
getAsyncResolverRefreshIntervalMsin interfaceEurekaTransportConfig- Returns:
- the interval to poll for the async resolver.
-
getAsyncResolverWarmUpTimeoutMs
public int getAsyncResolverWarmUpTimeoutMs()
- Specified by:
getAsyncResolverWarmUpTimeoutMsin interfaceEurekaTransportConfig- Returns:
- the async refresh timeout threshold in ms.
-
getAsyncExecutorThreadPoolSize
public int getAsyncExecutorThreadPoolSize()
- Specified by:
getAsyncExecutorThreadPoolSizein interfaceEurekaTransportConfig- Returns:
- the max threadpool size for the async resolver's executor
-
getWriteClusterVip
public java.lang.String getWriteClusterVip()
Description copied from interface:EurekaTransportConfigThe remote vipAddress of the primary eureka cluster to register with.- Specified by:
getWriteClusterVipin interfaceEurekaTransportConfig- Returns:
- the vipAddress for the write cluster to register with
-
getReadClusterVip
public java.lang.String getReadClusterVip()
Description copied from interface:EurekaTransportConfigThe remote vipAddress of the eureka cluster (either the primaries or a readonly replica) to fetch registry data from.- Specified by:
getReadClusterVipin interfaceEurekaTransportConfig- Returns:
- the vipAddress for the readonly cluster to redirect to, if applicable (can be the same as the bootstrap)
-
getBootstrapResolverStrategy
public java.lang.String getBootstrapResolverStrategy()
Description copied from interface:EurekaTransportConfigCan be used to specify different bootstrap resolve strategies. Current supported strategies are: - default (if no match): bootstrap from dns txt records or static config hostnames - composite: bootstrap from local registry if data is available and warm (seeEurekaTransportConfig.getApplicationsResolverDataStalenessThresholdSeconds(), otherwise fall back to a backing default- Specified by:
getBootstrapResolverStrategyin interfaceEurekaTransportConfig- Returns:
- null for the default strategy, by default
-
useBootstrapResolverForQuery
public boolean useBootstrapResolverForQuery()
Description copied from interface:EurekaTransportConfigBy default, the transport uses the same (bootstrap) resolver for queries. Set this property to false to use an indirect resolver to resolve query targets viaEurekaTransportConfig.getReadClusterVip(). This indirect resolver may or may not return the same targets as the bootstrap servers depending on how servers are setup.- Specified by:
useBootstrapResolverForQueryin interfaceEurekaTransportConfig- Returns:
- true by default.
-
-