Makes ServerListUpdater respect configuration.

By default, `LoadBalancerBuilder` built a load-balancer with a `PollingServerListUpdater`. This change introduces a `ServerListUpdater` bean which creates a `PollingServerListUpdater(IClientConfig)` so that `ribbon.ServerListRefreshInterval` is respected.

 fixes gh-1304
This commit is contained in:
Spencer Gibb
2017-03-14 12:24:38 -06:00
parent 66163bee2b
commit ecf12aa0e7
3 changed files with 53 additions and 12 deletions

View File

@@ -737,6 +737,7 @@ Spring Cloud Netflix provides the following beans by default for ribbon
* `ServerList<Server>` ribbonServerList: `ConfigurationBasedServerList`
* `ServerListFilter<Server>` ribbonServerListFilter: `ZonePreferenceServerListFilter`
* `ILoadBalancer` ribbonLoadBalancer: `ZoneAwareLoadBalancer`
* `ServerListUpdater` ribbonServerListUpdater: `PollingServerListUpdater`
Creating a bean of one of those type and placing it in a `@RibbonClient`
configuration (such as `FooConfiguration` above) allows you to override each