Skip to content

Commit

Permalink
Unbreak EurekaClientConfig interface compat (#1317)
Browse files Browse the repository at this point in the history
EurekaClientConfig is treated as stable backward-compat API as of couple of years ago, update it to preserve backward-compat. This un-does breaking contract change introduced by 6438fba.
  • Loading branch information
troshko111 authored Jun 29, 2020
1 parent 5e266be commit ef87b44
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

package com.netflix.discovery;

import javax.annotation.Nullable;
import java.util.List;

import javax.annotation.Nullable;

import com.google.inject.ImplementedBy;
import com.netflix.discovery.shared.transport.EurekaTransportConfig;

Expand Down Expand Up @@ -286,7 +287,7 @@ public interface EurekaClientConfig {
/**
* Indicates whether the client should explicitly unregister itself from the remote server
* on client shutdown.
*
*
* @return true if this instance should unregister with eureka on client shutdown, false otherwise
*/
default boolean shouldUnregisterOnShutdown() {
Expand Down Expand Up @@ -457,13 +458,15 @@ default boolean shouldUnregisterOnShutdown() {

/**
* If set to true, the {@link EurekaClient} initialization should throw an exception at constructor time
* if an initial fetch of eureka registry information from the remote servers is unsuccessful.
* if the initial fetch of eureka registry information from the remote servers is unsuccessful.
*
* Note that if {@link #shouldFetchRegistry()} is set to false, then this config is a no-op
* Note that if {@link #shouldFetchRegistry()} is set to false, then this config is a no-op.
*
* @return true or false for whether the client initialization should enforce an initial fetch
* @return true or false for whether the client initialization should enforce an initial fetch.
*/
boolean shouldEnforceFetchRegistryAtInit();
default boolean shouldEnforceFetchRegistryAtInit() {
return false;
}

/**
* Indicates whether the client is only interested in the registry information for a single VIP.
Expand Down

0 comments on commit ef87b44

Please sign in to comment.