Removes lombok

This commit is contained in:
Spencer Gibb
2018-06-05 14:55:58 -04:00
parent 8d55728418
commit 78a4e05281
14 changed files with 189 additions and 85 deletions

View File

@@ -20,9 +20,6 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import com.ecwid.consul.v1.ConsulClient;
import com.ecwid.consul.v1.QueryParams;
import com.ecwid.consul.v1.Response;
@@ -30,7 +27,9 @@ import com.ecwid.consul.v1.agent.model.Service;
import com.ecwid.consul.v1.catalog.model.CatalogService;
import com.ecwid.consul.v1.catalog.model.Node;
import lombok.Data;
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import org.springframework.core.style.ToStringCreator;
/**
* @author Spencer Gibb
@@ -66,7 +65,6 @@ public class ConsulEndpoint {
return data;
}
@Data
public static class ConsulData {
Map<String, List<CatalogService>> catalogServices = new LinkedHashMap<>();
@@ -74,6 +72,40 @@ public class ConsulEndpoint {
List<Node> catalogNodes;
// List<KeyValue> keyValues;
public ConsulData() {
}
public Map<String, List<CatalogService>> getCatalogServices() {
return this.catalogServices;
}
public Map<String, Service> getAgentServices() {
return this.agentServices;
}
public List<Node> getCatalogNodes() {
return this.catalogNodes;
}
public void setCatalogServices(Map<String, List<CatalogService>> catalogServices) {
this.catalogServices = catalogServices;
}
public void setAgentServices(Map<String, Service> agentServices) {
this.agentServices = agentServices;
}
public void setCatalogNodes(List<Node> catalogNodes) {
this.catalogNodes = catalogNodes;
}
@Override
public String toString() {
return new ToStringCreator(this)
.append("catalogServices", catalogServices)
.append("agentServices", agentServices)
.append("catalogNodes", catalogNodes)
.toString();
}
}
}

View File

@@ -17,14 +17,12 @@
package org.springframework.cloud.consul;
import org.springframework.boot.context.properties.ConfigurationProperties;
import lombok.Data;
import org.springframework.core.style.ToStringCreator;
/**
* @author Spencer Gibb
*/
@ConfigurationProperties("spring.cloud.consul.retry")
@Data
public class RetryProperties {
/** Initial retry interval in milliseconds. */
@@ -38,4 +36,49 @@ public class RetryProperties {
/** Maximum number of attempts. */
private int maxAttempts = 6;
public RetryProperties() {
}
public long getInitialInterval() {
return this.initialInterval;
}
public double getMultiplier() {
return this.multiplier;
}
public long getMaxInterval() {
return this.maxInterval;
}
public int getMaxAttempts() {
return this.maxAttempts;
}
public void setInitialInterval(long initialInterval) {
this.initialInterval = initialInterval;
}
public void setMultiplier(double multiplier) {
this.multiplier = multiplier;
}
public void setMaxInterval(long maxInterval) {
this.maxInterval = maxInterval;
}
public void setMaxAttempts(int maxAttempts) {
this.maxAttempts = maxAttempts;
}
@Override
public String toString() {
return new ToStringCreator(this)
.append("initialInterval", initialInterval)
.append("multiplier", multiplier)
.append("maxInterval", maxInterval)
.append("maxAttempts", maxAttempts)
.toString();
}
}