public class EurekaNotificationServerListUpdater
extends java.lang.Object
implements com.netflix.loadbalancer.ServerListUpdater
DynamicServerListLoadBalancer that
utilizes eureka's event listener to trigger LB cache updates.
Note that when a cache refreshed notification is received, the actual update on the serverList is
done on a separate scheduler as the notification is delivered on an eurekaClient thread.| Constructor and Description |
|---|
EurekaNotificationServerListUpdater() |
EurekaNotificationServerListUpdater(javax.inject.Provider<com.netflix.discovery.EurekaClient> eurekaClientProvider) |
EurekaNotificationServerListUpdater(javax.inject.Provider<com.netflix.discovery.EurekaClient> eurekaClientProvider,
java.util.concurrent.ExecutorService refreshExecutor) |
| Modifier and Type | Method and Description |
|---|---|
int |
getCoreThreads() |
static java.util.concurrent.ExecutorService |
getDefaultRefreshExecutor() |
long |
getDurationSinceLastUpdateMs() |
java.lang.String |
getLastUpdate() |
int |
getNumberMissedCycles() |
void |
start(com.netflix.loadbalancer.ServerListUpdater.UpdateAction updateAction) |
void |
stop() |
public EurekaNotificationServerListUpdater()
public EurekaNotificationServerListUpdater(javax.inject.Provider<com.netflix.discovery.EurekaClient> eurekaClientProvider)
public EurekaNotificationServerListUpdater(javax.inject.Provider<com.netflix.discovery.EurekaClient> eurekaClientProvider,
java.util.concurrent.ExecutorService refreshExecutor)
public static java.util.concurrent.ExecutorService getDefaultRefreshExecutor()
public void start(com.netflix.loadbalancer.ServerListUpdater.UpdateAction updateAction)
start in interface com.netflix.loadbalancer.ServerListUpdaterpublic void stop()
stop in interface com.netflix.loadbalancer.ServerListUpdaterpublic java.lang.String getLastUpdate()
getLastUpdate in interface com.netflix.loadbalancer.ServerListUpdaterpublic long getDurationSinceLastUpdateMs()
getDurationSinceLastUpdateMs in interface com.netflix.loadbalancer.ServerListUpdaterpublic int getNumberMissedCycles()
getNumberMissedCycles in interface com.netflix.loadbalancer.ServerListUpdaterpublic int getCoreThreads()
getCoreThreads in interface com.netflix.loadbalancer.ServerListUpdater