Java Code Examples for com.netflix.discovery.EurekaClient#getApplications()

The following examples show how to use com.netflix.discovery.EurekaClient#getApplications() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EurekaConfig.java    From api-layer with Eclipse Public License 2.0 5 votes vote down vote up
@Bean
@Primary
public ApimlInstanceRegistry getApimlInstanceRegistry(
    EurekaServerConfig serverConfig,
    EurekaClientConfig clientConfig,
    ServerCodecs serverCodecs,
    EurekaClient eurekaClient,
    InstanceRegistryProperties instanceRegistryProperties,
    ApplicationContext appCntx)
{
    eurekaClient.getApplications(); // force initialization
    return new ApimlInstanceRegistry(serverConfig, clientConfig, serverCodecs, eurekaClient, instanceRegistryProperties,appCntx);
}
 
Example 2
Source File: EurekaConsulAdapterConfig.java    From eureka-consul-adapter with MIT License 5 votes vote down vote up
@Bean
@Primary
public RegistrationEventInstanceRegistry registrationEventInstanceRegistry(
        ServerCodecs serverCodecs, EurekaServerConfig eurekaServerConfig, EurekaClient eurekaClient,
        EurekaClientConfig eurekaClientConfig, InstanceRegistryProperties instanceRegistryProperties,
        ServiceChangeDetector serviceChangeDetector) {
    eurekaClient.getApplications(); // force initialization
    return new RegistrationEventInstanceRegistry(eurekaServerConfig, eurekaClientConfig,
            serverCodecs, eurekaClient,
            instanceRegistryProperties.getExpectedNumberOfClientsSendingRenews(),
            instanceRegistryProperties.getDefaultOpenForTrafficCount(), serviceChangeDetector);
}