com.netflix.niws.loadbalancer.LegacyEurekaClientProvider Maven / Gradle / Ivy
package com.netflix.niws.loadbalancer;
import com.netflix.discovery.DiscoveryManager;
import com.netflix.discovery.EurekaClient;
import javax.inject.Provider;
/**
* A legacy class to provide eurekaclient via static singletons
*/
class LegacyEurekaClientProvider implements Provider {
private volatile EurekaClient eurekaClient;
@Override
public synchronized EurekaClient get() {
if (eurekaClient == null) {
eurekaClient = DiscoveryManager.getInstance().getDiscoveryClient();
}
return eurekaClient;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy