Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
spring-cloud-netflix
Commits
030a8e71
Commit
030a8e71
authored
May 10, 2017
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Lombok from hystrix stream
parent
ced1f36d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
22 deletions
+79
-22
pom.xml
spring-cloud-netflix-hystrix-stream/pom.xml
+1
-7
HystrixStreamProperties.java
...cloud/netflix/hystrix/stream/HystrixStreamProperties.java
+64
-3
HystrixStreamTask.java
...ework/cloud/netflix/hystrix/stream/HystrixStreamTask.java
+14
-12
No files found.
spring-cloud-netflix-hystrix-stream/pom.xml
View file @
030a8e71
...
@@ -61,12 +61,6 @@
...
@@ -61,12 +61,6 @@
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<scope>
compile
</scope>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
<scope>
test
</scope>
...
@@ -83,7 +77,7 @@
...
@@ -83,7 +77,7 @@
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-stream-
binder-rabbi
t
</artifactId>
<artifactId>
spring-cloud-stream-
test-suppor
t
</artifactId>
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
</dependencies>
</dependencies>
...
...
spring-cloud-netflix-hystrix-stream/src/main/java/org/springframework/cloud/netflix/hystrix/stream/HystrixStreamProperties.java
View file @
030a8e71
...
@@ -19,13 +19,10 @@ package org.springframework.cloud.netflix.hystrix.stream;
...
@@ -19,13 +19,10 @@ package org.springframework.cloud.netflix.hystrix.stream;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.cloud.netflix.hystrix.HystrixConstants
;
import
org.springframework.cloud.netflix.hystrix.HystrixConstants
;
import
lombok.Data
;
/**
/**
* @author Spencer Gibb
* @author Spencer Gibb
*/
*/
@ConfigurationProperties
(
"hystrix.stream.queue"
)
@ConfigurationProperties
(
"hystrix.stream.queue"
)
@Data
public
class
HystrixStreamProperties
{
public
class
HystrixStreamProperties
{
/** Flag to indicate that Hystrix Stream is enabled. Default is true. */
/** Flag to indicate that Hystrix Stream is enabled. Default is true. */
...
@@ -52,4 +49,68 @@ public class HystrixStreamProperties {
...
@@ -52,4 +49,68 @@ public class HystrixStreamProperties {
/** The size of the metrics queue. This queue drains to the stream. Defaults to 1000. */
/** The size of the metrics queue. This queue drains to the stream. Defaults to 1000. */
private
int
size
=
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
;
}
}
}
spring-cloud-netflix-hystrix-stream/src/main/java/org/springframework/cloud/netflix/hystrix/stream/HystrixStreamTask.java
View file @
030a8e71
...
@@ -22,16 +22,6 @@ import java.util.ArrayList;
...
@@ -22,16 +22,6 @@ import java.util.ArrayList;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.concurrent.LinkedBlockingQueue
;
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.JsonFactory
;
import
com.fasterxml.jackson.core.JsonGenerator
;
import
com.fasterxml.jackson.core.JsonGenerator
;
import
com.netflix.hystrix.HystrixCircuitBreaker
;
import
com.netflix.hystrix.HystrixCircuitBreaker
;
...
@@ -42,7 +32,18 @@ import com.netflix.hystrix.HystrixThreadPoolKey;
...
@@ -42,7 +32,18 @@ import com.netflix.hystrix.HystrixThreadPoolKey;
import
com.netflix.hystrix.HystrixThreadPoolMetrics
;
import
com.netflix.hystrix.HystrixThreadPoolMetrics
;
import
com.netflix.hystrix.util.HystrixRollingNumberEvent
;
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
* @author Spencer Gibb
...
@@ -50,8 +51,9 @@ import lombok.extern.apachecommons.CommonsLog;
...
@@ -50,8 +51,9 @@ import lombok.extern.apachecommons.CommonsLog;
* @see com.netflix.hystrix.contrib.metrics.eventstream.HystrixMetricsPoller (nested
* @see com.netflix.hystrix.contrib.metrics.eventstream.HystrixMetricsPoller (nested
* private class MetricsPoller)
* private class MetricsPoller)
*/
*/
@CommonsLog
public
class
HystrixStreamTask
implements
ApplicationContextAware
{
public
class
HystrixStreamTask
implements
ApplicationContextAware
{
private
static
Log
log
=
LogFactory
.
getLog
(
HystrixStreamTask
.
class
);
private
MessageChannel
outboundChannel
;
private
MessageChannel
outboundChannel
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment