@@ -26,15 +26,13 @@ import java.util.Objects;
|
||||
*/
|
||||
public class ConfigurationUpdateStrategy {
|
||||
|
||||
private String name;
|
||||
private final String name;
|
||||
|
||||
private Runnable reloadProcedure;
|
||||
private final Runnable reloadProcedure;
|
||||
|
||||
public ConfigurationUpdateStrategy(String name, Runnable reloadProcedure) {
|
||||
Objects.requireNonNull(name, "name cannot be null");
|
||||
Objects.requireNonNull(reloadProcedure, "reloadProcedure cannot be null");
|
||||
this.name = name;
|
||||
this.reloadProcedure = reloadProcedure;
|
||||
this.name = Objects.requireNonNull(name, "name cannot be null");
|
||||
this.reloadProcedure = Objects.requireNonNull(reloadProcedure, "reloadProcedure cannot be null");
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
@@ -47,10 +45,7 @@ public class ConfigurationUpdateStrategy {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder sb = new StringBuilder("ConfigurationUpdateStrategy{");
|
||||
sb.append("name='").append(this.name).append('\'');
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
return "ConfigurationUpdateStrategy{name='" + this.name + "'}";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,11 +44,11 @@ import org.springframework.core.env.AbstractEnvironment;
|
||||
*/
|
||||
public class EventBasedConfigurationChangeDetector extends ConfigurationChangeDetector {
|
||||
|
||||
private ConfigMapPropertySourceLocator configMapPropertySourceLocator;
|
||||
private final ConfigMapPropertySourceLocator configMapPropertySourceLocator;
|
||||
|
||||
private SecretsPropertySourceLocator secretsPropertySourceLocator;
|
||||
private final SecretsPropertySourceLocator secretsPropertySourceLocator;
|
||||
|
||||
private Map<String, Watch> watches;
|
||||
private final Map<String, Watch> watches;
|
||||
|
||||
public EventBasedConfigurationChangeDetector(AbstractEnvironment environment, ConfigReloadProperties properties,
|
||||
KubernetesClient kubernetesClient, ConfigurationUpdateStrategy strategy,
|
||||
|
||||
@@ -43,9 +43,9 @@ public class PollingConfigurationChangeDetector extends ConfigurationChangeDetec
|
||||
|
||||
protected Log log = LogFactory.getLog(getClass());
|
||||
|
||||
private ConfigMapPropertySourceLocator configMapPropertySourceLocator;
|
||||
private final ConfigMapPropertySourceLocator configMapPropertySourceLocator;
|
||||
|
||||
private SecretsPropertySourceLocator secretsPropertySourceLocator;
|
||||
private final SecretsPropertySourceLocator secretsPropertySourceLocator;
|
||||
|
||||
public PollingConfigurationChangeDetector(AbstractEnvironment environment, ConfigReloadProperties properties,
|
||||
KubernetesClient kubernetesClient, ConfigurationUpdateStrategy strategy,
|
||||
|
||||
Reference in New Issue
Block a user