Commit 0dea44ac by Gregor Zurowski

Remove Lombok from spring-cloud-netflix-turbine module

parent d0009ba0
......@@ -90,13 +90,6 @@
<artifactId>turbine-core</artifactId>
</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-test</artifactId>
<scope>test</scope>
......
......@@ -21,6 +21,8 @@ import java.util.Collection;
import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.expression.Expression;
......@@ -30,8 +32,6 @@ import org.springframework.expression.spel.support.StandardEvaluationContext;
import com.netflix.turbine.discovery.Instance;
import com.netflix.turbine.discovery.InstanceDiscovery;
import lombok.extern.apachecommons.CommonsLog;
/**
* Class that encapsulates an {@link InstanceDiscovery}
* implementation that uses Spring Cloud Commons (see https://github.com/spring-cloud/spring-cloud-commons)
......@@ -45,9 +45,10 @@ import lombok.extern.apachecommons.CommonsLog;
*
* @author Spencer Gibb
*/
@CommonsLog
public class CommonsInstanceDiscovery implements InstanceDiscovery {
private static final Log log = LogFactory.getLog(CommonsInstanceDiscovery.class);
private static final String DEFAULT_CLUSTER_NAME_EXPRESSION = "serviceId";
protected static final String PORT_KEY = "port";
protected static final String SECURE_PORT_KEY = "securePort";
......
......@@ -27,8 +27,8 @@ import com.netflix.appinfo.InstanceInfo.InstanceStatus;
import com.netflix.discovery.EurekaClient;
import com.netflix.discovery.shared.Application;
import com.netflix.turbine.discovery.Instance;
import lombok.extern.apachecommons.CommonsLog;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Class that encapsulates an {@link com.netflix.turbine.discovery.InstanceDiscovery}
......@@ -43,9 +43,10 @@ import lombok.extern.apachecommons.CommonsLog;
*
* @author Spencer Gibb
*/
@CommonsLog
public class EurekaInstanceDiscovery extends CommonsInstanceDiscovery {
private static final Log log = LogFactory.getLog(EurekaInstanceDiscovery.class);
private static final String EUREKA_DEFAULT_CLUSTER_NAME_EXPRESSION = "appName";
private static final String ASG_KEY = "asg";
......
......@@ -31,16 +31,18 @@ import com.netflix.turbine.monitor.cluster.AggregateClusterMonitor;
import com.netflix.turbine.monitor.cluster.ClusterMonitor;
import com.netflix.turbine.monitor.cluster.ClusterMonitorFactory;
import lombok.extern.apachecommons.CommonsLog;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import static com.netflix.turbine.monitor.cluster.AggregateClusterMonitor.AggregatorClusterMonitorConsole;
/**
* @author Spencer Gibb
*/
@CommonsLog
public class SpringAggregatorFactory implements ClusterMonitorFactory<AggDataFromCluster> {
private static final Log log = LogFactory.getLog(SpringAggregatorFactory.class);
private static final DynamicStringProperty aggClusters = DynamicPropertyFactory
.getInstance().getStringProperty("turbine.aggregator.clusterConfig", null);
......
......@@ -18,16 +18,15 @@ package org.springframework.cloud.netflix.turbine;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.util.StringUtils;
import lombok.Data;
/**
* @author Spencer Gibb
* @author Gregor Zurowski
*/
@Data
@ConfigurationProperties("turbine")
public class TurbineProperties {
......@@ -48,4 +47,53 @@ public class TurbineProperties {
}
return null;
}
public String getClusterNameExpression() {
return clusterNameExpression;
}
public void setClusterNameExpression(String clusterNameExpression) {
this.clusterNameExpression = clusterNameExpression;
}
public String getAppConfig() {
return appConfig;
}
public void setAppConfig(String appConfig) {
this.appConfig = appConfig;
}
public boolean isCombineHostPort() {
return combineHostPort;
}
public void setCombineHostPort(boolean combineHostPort) {
this.combineHostPort = combineHostPort;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TurbineProperties that = (TurbineProperties) o;
return Objects.equals(clusterNameExpression, that.clusterNameExpression) &&
Objects.equals(appConfig, that.appConfig) &&
Objects.equals(combineHostPort, that.combineHostPort);
}
@Override
public int hashCode() {
return Objects.hash(clusterNameExpression, appConfig, combineHostPort);
}
@Override
public String toString() {
return new StringBuilder("TurbineProperties{")
.append("clusterNameExpression='").append(clusterNameExpression).append("', ")
.append("appConfig='").append(appConfig).append("', ")
.append("combineHostPort=").append(combineHostPort).append("}")
.toString();
}
}
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