Remove Lombok from hystrix stream
This commit is contained in:
@@ -60,12 +60,6 @@
|
||||
<artifactId>eureka-client</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
@@ -83,7 +77,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
|
||||
<artifactId>spring-cloud-stream-test-support</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -19,13 +19,10 @@ package org.springframework.cloud.netflix.hystrix.stream;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.cloud.netflix.hystrix.HystrixConstants;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
*/
|
||||
@ConfigurationProperties("hystrix.stream.queue")
|
||||
@Data
|
||||
public class HystrixStreamProperties {
|
||||
|
||||
/** Flag to indicate that Hystrix Stream is enabled. Default is true. */
|
||||
@@ -52,4 +49,68 @@ public class HystrixStreamProperties {
|
||||
/** The size of the metrics queue. This queue drains to the stream. Defaults to 1000. */
|
||||
private int size = 1000;
|
||||
|
||||
public boolean isEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public boolean isPrefixMetricName() {
|
||||
return prefixMetricName;
|
||||
}
|
||||
|
||||
public void setPrefixMetricName(boolean prefixMetricName) {
|
||||
this.prefixMetricName = prefixMetricName;
|
||||
}
|
||||
|
||||
public boolean isSendId() {
|
||||
return sendId;
|
||||
}
|
||||
|
||||
public void setSendId(boolean sendId) {
|
||||
this.sendId = sendId;
|
||||
}
|
||||
|
||||
public String getDestination() {
|
||||
return destination;
|
||||
}
|
||||
|
||||
public void setDestination(String destination) {
|
||||
this.destination = destination;
|
||||
}
|
||||
|
||||
public String getContentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
public void setContentType(String contentType) {
|
||||
this.contentType = contentType;
|
||||
}
|
||||
|
||||
public long getSendRate() {
|
||||
return sendRate;
|
||||
}
|
||||
|
||||
public void setSendRate(long sendRate) {
|
||||
this.sendRate = sendRate;
|
||||
}
|
||||
|
||||
public long getGatherRate() {
|
||||
return gatherRate;
|
||||
}
|
||||
|
||||
public void setGatherRate(long gatherRate) {
|
||||
this.gatherRate = gatherRate;
|
||||
}
|
||||
|
||||
public int getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public void setSize(int size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,16 +22,6 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.cloud.client.ServiceInstance;
|
||||
import org.springframework.cloud.client.discovery.DiscoveryClient;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.messaging.MessageHeaders;
|
||||
import org.springframework.messaging.support.MessageBuilder;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonFactory;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.netflix.hystrix.HystrixCircuitBreaker;
|
||||
@@ -42,7 +32,18 @@ import com.netflix.hystrix.HystrixThreadPoolKey;
|
||||
import com.netflix.hystrix.HystrixThreadPoolMetrics;
|
||||
import com.netflix.hystrix.util.HystrixRollingNumberEvent;
|
||||
|
||||
import lombok.extern.apachecommons.CommonsLog;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.cloud.client.ServiceInstance;
|
||||
import org.springframework.cloud.client.discovery.DiscoveryClient;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.messaging.MessageHeaders;
|
||||
import org.springframework.messaging.support.MessageBuilder;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
@@ -50,8 +51,9 @@ import lombok.extern.apachecommons.CommonsLog;
|
||||
* @see com.netflix.hystrix.contrib.metrics.eventstream.HystrixMetricsPoller (nested
|
||||
* private class MetricsPoller)
|
||||
*/
|
||||
@CommonsLog
|
||||
public class HystrixStreamTask implements ApplicationContextAware {
|
||||
|
||||
private static Log log = LogFactory.getLog(HystrixStreamTask.class);
|
||||
|
||||
private MessageChannel outboundChannel;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user