Commit aa2159b7 by Gregor Zurowski Committed by Spencer Gibb

Remove Lombok from spring-cloud-netflix-eureka-client module (#2131)

parent 1c30c246
......@@ -112,13 +112,6 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<!-- Only needed at compile time -->
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<scope>test</scope>
......
......@@ -18,12 +18,12 @@ package org.springframework.cloud.netflix.eureka;
import com.netflix.discovery.shared.transport.EurekaTransportConfig;
import lombok.Data;
import java.util.Objects;
/**
* @author Spencer Gibb
* @author Gregor Zurowski
*/
@Data
public class CloudEurekaTransportConfig implements EurekaTransportConfig {
private int sessionedClientReconnectIntervalSeconds = 20 * 60;
......@@ -59,4 +59,153 @@ public class CloudEurekaTransportConfig implements EurekaTransportConfig {
public boolean applicationsResolverUseIp() {
return this.applicationsResolverUseIp;
}
public int getSessionedClientReconnectIntervalSeconds() {
return sessionedClientReconnectIntervalSeconds;
}
public void setSessionedClientReconnectIntervalSeconds(
int sessionedClientReconnectIntervalSeconds) {
this.sessionedClientReconnectIntervalSeconds = sessionedClientReconnectIntervalSeconds;
}
public double getRetryableClientQuarantineRefreshPercentage() {
return retryableClientQuarantineRefreshPercentage;
}
public void setRetryableClientQuarantineRefreshPercentage(
double retryableClientQuarantineRefreshPercentage) {
this.retryableClientQuarantineRefreshPercentage = retryableClientQuarantineRefreshPercentage;
}
public int getBootstrapResolverRefreshIntervalSeconds() {
return bootstrapResolverRefreshIntervalSeconds;
}
public void setBootstrapResolverRefreshIntervalSeconds(
int bootstrapResolverRefreshIntervalSeconds) {
this.bootstrapResolverRefreshIntervalSeconds = bootstrapResolverRefreshIntervalSeconds;
}
public int getApplicationsResolverDataStalenessThresholdSeconds() {
return applicationsResolverDataStalenessThresholdSeconds;
}
public void setApplicationsResolverDataStalenessThresholdSeconds(
int applicationsResolverDataStalenessThresholdSeconds) {
this.applicationsResolverDataStalenessThresholdSeconds = applicationsResolverDataStalenessThresholdSeconds;
}
public int getAsyncResolverRefreshIntervalMs() {
return asyncResolverRefreshIntervalMs;
}
public void setAsyncResolverRefreshIntervalMs(int asyncResolverRefreshIntervalMs) {
this.asyncResolverRefreshIntervalMs = asyncResolverRefreshIntervalMs;
}
public int getAsyncResolverWarmUpTimeoutMs() {
return asyncResolverWarmUpTimeoutMs;
}
public void setAsyncResolverWarmUpTimeoutMs(int asyncResolverWarmUpTimeoutMs) {
this.asyncResolverWarmUpTimeoutMs = asyncResolverWarmUpTimeoutMs;
}
public int getAsyncExecutorThreadPoolSize() {
return asyncExecutorThreadPoolSize;
}
public void setAsyncExecutorThreadPoolSize(int asyncExecutorThreadPoolSize) {
this.asyncExecutorThreadPoolSize = asyncExecutorThreadPoolSize;
}
public String getReadClusterVip() {
return readClusterVip;
}
public void setReadClusterVip(String readClusterVip) {
this.readClusterVip = readClusterVip;
}
public String getWriteClusterVip() {
return writeClusterVip;
}
public void setWriteClusterVip(String writeClusterVip) {
this.writeClusterVip = writeClusterVip;
}
public boolean isBootstrapResolverForQuery() {
return bootstrapResolverForQuery;
}
public void setBootstrapResolverForQuery(boolean bootstrapResolverForQuery) {
this.bootstrapResolverForQuery = bootstrapResolverForQuery;
}
public String getBootstrapResolverStrategy() {
return bootstrapResolverStrategy;
}
public void setBootstrapResolverStrategy(String bootstrapResolverStrategy) {
this.bootstrapResolverStrategy = bootstrapResolverStrategy;
}
public boolean isApplicationsResolverUseIp() {
return applicationsResolverUseIp;
}
public void setApplicationsResolverUseIp(boolean applicationsResolverUseIp) {
this.applicationsResolverUseIp = applicationsResolverUseIp;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CloudEurekaTransportConfig that = (CloudEurekaTransportConfig) o;
return sessionedClientReconnectIntervalSeconds == that.sessionedClientReconnectIntervalSeconds &&
Double.compare(retryableClientQuarantineRefreshPercentage, that.retryableClientQuarantineRefreshPercentage) == 0 &&
bootstrapResolverRefreshIntervalSeconds == that.bootstrapResolverRefreshIntervalSeconds &&
applicationsResolverDataStalenessThresholdSeconds == that.applicationsResolverDataStalenessThresholdSeconds &&
asyncResolverRefreshIntervalMs == that.asyncResolverRefreshIntervalMs &&
asyncResolverWarmUpTimeoutMs == that.asyncResolverWarmUpTimeoutMs &&
asyncExecutorThreadPoolSize == that.asyncExecutorThreadPoolSize &&
Objects.equals(readClusterVip, that.readClusterVip) &&
Objects.equals(writeClusterVip, that.writeClusterVip) &&
bootstrapResolverForQuery == that.bootstrapResolverForQuery &&
Objects.equals(bootstrapResolverStrategy, that.bootstrapResolverStrategy) &&
applicationsResolverUseIp == that.applicationsResolverUseIp;
}
@Override
public int hashCode() {
return Objects.hash(sessionedClientReconnectIntervalSeconds,
retryableClientQuarantineRefreshPercentage,
bootstrapResolverRefreshIntervalSeconds,
applicationsResolverDataStalenessThresholdSeconds,
asyncResolverRefreshIntervalMs, asyncResolverWarmUpTimeoutMs,
asyncExecutorThreadPoolSize, readClusterVip, writeClusterVip,
bootstrapResolverForQuery, bootstrapResolverStrategy,
applicationsResolverUseIp);
}
@Override
public String toString() {
return new StringBuilder("CloudEurekaTransportConfig{")
.append("sessionedClientReconnectIntervalSeconds=").append(sessionedClientReconnectIntervalSeconds).append(", ")
.append("retryableClientQuarantineRefreshPercentage=").append(retryableClientQuarantineRefreshPercentage).append(", ")
.append("bootstrapResolverRefreshIntervalSeconds=").append(bootstrapResolverRefreshIntervalSeconds).append(", ")
.append("applicationsResolverDataStalenessThresholdSeconds=").append(applicationsResolverDataStalenessThresholdSeconds).append(", ")
.append("asyncResolverRefreshIntervalMs=").append(asyncResolverRefreshIntervalMs).append(", ")
.append("asyncResolverWarmUpTimeoutMs=").append(asyncResolverWarmUpTimeoutMs).append(", ")
.append("asyncExecutorThreadPoolSize=").append(asyncExecutorThreadPoolSize).append(", ")
.append("readClusterVip='").append(readClusterVip).append("', ")
.append("writeClusterVip='").append(writeClusterVip).append("', ")
.append("bootstrapResolverForQuery=").append(bootstrapResolverForQuery).append(", ")
.append("bootstrapResolverStrategy='").append(bootstrapResolverStrategy).append("', ")
.append("applicationsResolverUseIp=").append(applicationsResolverUseIp).append(", ").append("}")
.toString();
}
}
......@@ -35,12 +35,9 @@ import com.netflix.discovery.EurekaClient;
import com.netflix.discovery.shared.Application;
import com.netflix.discovery.shared.Applications;
import lombok.RequiredArgsConstructor;
/**
* @author Spencer Gibb
*/
@RequiredArgsConstructor
public class EurekaDiscoveryClient implements DiscoveryClient {
public static final String DESCRIPTION = "Spring Cloud Eureka Discovery Client";
......@@ -49,6 +46,11 @@ public class EurekaDiscoveryClient implements DiscoveryClient {
private final EurekaClient eurekaClient;
public EurekaDiscoveryClient(EurekaInstanceConfig config, EurekaClient eurekaClient) {
this.config = config;
this.eurekaClient = eurekaClient;
}
@Override
public String description() {
return DESCRIPTION;
......
......@@ -19,9 +19,6 @@ package org.springframework.cloud.netflix.ribbon.eureka;
import java.util.ArrayList;
import java.util.List;
import lombok.Getter;
import lombok.Setter;
import com.netflix.appinfo.InstanceInfo;
import com.netflix.client.config.CommonClientConfigKey;
import com.netflix.client.config.IClientConfig;
......@@ -78,10 +75,18 @@ public class DomainExtractingServerList implements ServerList<DiscoveryEnabledSe
class DomainExtractingServer extends DiscoveryEnabledServer {
@Getter
@Setter
private String id;
@Override
public String getId() {
return id;
}
@Override
public void setId(String id) {
this.id = id;
}
public DomainExtractingServer(DiscoveryEnabledServer server, boolean useSecurePort,
boolean useIpAddr, boolean approximateZoneFromHostname) {
// host and port are set in super()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment