You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ra...@apache.org on 2016/03/28 12:31:10 UTC

[24/27] camel git commit: Renamed Hystrix properties to follow naming convention

Renamed Hystrix properties to follow naming convention


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bf6d63a7
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bf6d63a7
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bf6d63a7

Branch: refs/heads/jdk8-lambdas
Commit: bf6d63a7c3dee2c340ca2eb5740106823ef72aae
Parents: 930d4fe
Author: bibryam <bi...@apache.org>
Authored: Sun Mar 27 20:59:58 2016 +0100
Committer: bibryam <bi...@apache.org>
Committed: Sun Mar 27 20:59:58 2016 +0100

----------------------------------------------------------------------
 .../component/hystrix/HystrixConfiguration.java | 30 ++++++++++----------
 .../component/hystrix/HystrixConstants.java     |  8 ++++--
 .../component/hystrix/HystrixProducer.java      | 16 +++++------
 3 files changed, 29 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/bf6d63a7/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/HystrixConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/HystrixConfiguration.java b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/HystrixConfiguration.java
index 157b5ac..2e5c6c5 100644
--- a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/HystrixConfiguration.java
+++ b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/HystrixConfiguration.java
@@ -69,12 +69,12 @@ public class HystrixConfiguration {
     @UriParam(label = "producer")
     private String fallbackEndpointId;
 
-    private Integer corePoolSize;
+    private Integer coreSize;
     private Integer keepAliveTime;
     private Integer maxQueueSize;
     private Integer queueSizeRejectionThreshold;
-    private Integer threadPoolRollingNumberStatisticalWindowInMilliseconds;
-    private Integer threadPoolRollingNumberStatisticalWindowBuckets;
+    private Integer threadPoolMetricsRollingStatisticalWindowInMilliseconds;
+    private Integer threadPoolMetricsRollingStatisticalWindowBuckets;
 
     private Boolean circuitBreakerEnabled;
     private Integer circuitBreakerErrorThresholdPercentage;
@@ -161,12 +161,12 @@ public class HystrixConfiguration {
         this.threadPoolKey = threadPoolKey;
     }
 
-    public Integer getCorePoolSize() {
-        return corePoolSize;
+    public Integer getCoreSize() {
+        return coreSize;
     }
 
-    public void setCorePoolSize(Integer corePoolSize) {
-        this.corePoolSize = corePoolSize;
+    public void setCoreSize(Integer coreSize) {
+        this.coreSize = coreSize;
     }
 
     public Integer getKeepAliveTime() {
@@ -193,20 +193,20 @@ public class HystrixConfiguration {
         this.queueSizeRejectionThreshold = queueSizeRejectionThreshold;
     }
 
-    public Integer getThreadPoolRollingNumberStatisticalWindowInMilliseconds() {
-        return threadPoolRollingNumberStatisticalWindowInMilliseconds;
+    public Integer getThreadPoolMetricsRollingStatisticalWindowInMilliseconds() {
+        return threadPoolMetricsRollingStatisticalWindowInMilliseconds;
     }
 
-    public void setThreadPoolRollingNumberStatisticalWindowInMilliseconds(Integer threadPoolRollingNumberStatisticalWindowInMilliseconds) {
-        this.threadPoolRollingNumberStatisticalWindowInMilliseconds = threadPoolRollingNumberStatisticalWindowInMilliseconds;
+    public void setThreadPoolMetricsRollingStatisticalWindowInMilliseconds(Integer threadPoolMetricsRollingStatisticalWindowInMilliseconds) {
+        this.threadPoolMetricsRollingStatisticalWindowInMilliseconds = threadPoolMetricsRollingStatisticalWindowInMilliseconds;
     }
 
-    public Integer getThreadPoolRollingNumberStatisticalWindowBuckets() {
-        return threadPoolRollingNumberStatisticalWindowBuckets;
+    public Integer getThreadPoolMetricsRollingStatisticalWindowBuckets() {
+        return threadPoolMetricsRollingStatisticalWindowBuckets;
     }
 
-    public void setThreadPoolRollingNumberStatisticalWindowBuckets(Integer threadPoolRollingNumberStatisticalWindowBuckets) {
-        this.threadPoolRollingNumberStatisticalWindowBuckets = threadPoolRollingNumberStatisticalWindowBuckets;
+    public void setThreadPoolMetricsRollingStatisticalWindowBuckets(Integer threadPoolMetricsRollingStatisticalWindowBuckets) {
+        this.threadPoolMetricsRollingStatisticalWindowBuckets = threadPoolMetricsRollingStatisticalWindowBuckets;
     }
 
     public Boolean getCircuitBreakerEnabled() {

http://git-wip-us.apache.org/repos/asf/camel/blob/bf6d63a7/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/HystrixConstants.java
----------------------------------------------------------------------
diff --git a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/HystrixConstants.java b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/HystrixConstants.java
index 803635d..7368d04 100644
--- a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/HystrixConstants.java
+++ b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/HystrixConstants.java
@@ -26,12 +26,16 @@ public interface HystrixConstants {
     String CAMEL_HYSTRIX_THREAD_POOL_KEY = "CamelHystrixThreadPoolKey";
     String CAMEL_HYSTRIX_RUN_ENDPOINT_ID = "CamelHystrixRunEndpointId";
     String CAMEL_HYSTRIX_FALLBACK_ENDPOINT_ID = "CamelHystrixFallbackEndpointId";
-    String CAMEL_HYSTRIX_CORE_POOL_SIZE = "CamelHystrixCorePoolSize";
+    String CAMEL_HYSTRIX_CORE_SIZE = "CamelHystrixCoreSize";
     String CAMEL_HYSTRIX_KEEP_ALIVE_TIME = "CamelHystrixKeepAliveTime";
     String CAMEL_HYSTRIX_MAX_QUEUE_SIZE = "CamelHystrixMaxQueueSize";
     String CAMEL_HYSTRIX_QUEUE_SIZE_REJECTION_THRESHOLD = "CamelHystrixQueueSizeRejectionThreshold";
-    String CAMEL_HYSTRIX_THREAD_POOL_ROLLING_NUMBER_STATISTICAL_WINDOW_IN_MILLISECONDS = "CamelHystrixThreadPoolRollingNumberStatisticalWindowInMilliseconds";
+
+    String CAMEL_HYSTRIX_THREAD_POOL_METRICS_ROLLING_STATISTICAL_WINDOW_IN_MILLISECONDS = "CamelHystrixThreadPoolMetricsRollingStatisticalWindowInMilliseconds";
     String CAMEL_HYSTRIX_THREAD_POOL_ROLLING_NUMBER_STATISTICAL_WINDOW_BUCKETS = "CamelHystrixThreadPoolRollingNumberStatisticalWindowBuckets";
+
+
+
     String CAMEL_HYSTRIX_CIRCUIT_BREAKER_ENABLED = "CamelHystrixCircuitBreakerEnabled";
     String CAMEL_HYSTRIX_CIRCUIT_BREAKER_ERROR_THRESHOLD_PERCENTAGE = "CamelHystrixCircuitBreakerErrorThresholdPercentage";
     String CAMEL_HYSTRIX_CIRCUIT_BREAKER_FORCE_CLOSED = "CamelHystrixCircuitBreakerForceClosed";

http://git-wip-us.apache.org/repos/asf/camel/blob/bf6d63a7/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/HystrixProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/HystrixProducer.java b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/HystrixProducer.java
index 851c4cb..46ac659 100644
--- a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/HystrixProducer.java
+++ b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/HystrixProducer.java
@@ -236,9 +236,9 @@ public class HystrixProducer extends DefaultProducer {
                     exchange.getIn().getHeader(HystrixConstants.CAMEL_HYSTRIX_THREAD_POOL_KEY, configuration.getThreadPoolKey(), String.class)));
         }
 
-        if (exchange.getIn().getHeader(HystrixConstants.CAMEL_HYSTRIX_CORE_POOL_SIZE, configuration.getCorePoolSize(), Integer.class) != null) {
+        if (exchange.getIn().getHeader(HystrixConstants.CAMEL_HYSTRIX_CORE_SIZE, configuration.getCoreSize(), Integer.class) != null) {
             threadPoolProperties.withCoreSize(
-                    exchange.getIn().getHeader(HystrixConstants.CAMEL_HYSTRIX_CORE_POOL_SIZE, configuration.getCorePoolSize(), Integer.class));
+                    exchange.getIn().getHeader(HystrixConstants.CAMEL_HYSTRIX_CORE_SIZE, configuration.getCoreSize(), Integer.class));
         }
 
         if (exchange.getIn().getHeader(HystrixConstants.CAMEL_HYSTRIX_KEEP_ALIVE_TIME, configuration.getKeepAliveTime(), Integer.class) != null) {
@@ -258,18 +258,18 @@ public class HystrixProducer extends DefaultProducer {
                             configuration.getQueueSizeRejectionThreshold(), Integer.class));
         }
 
-        if (exchange.getIn().getHeader(HystrixConstants.CAMEL_HYSTRIX_THREAD_POOL_ROLLING_NUMBER_STATISTICAL_WINDOW_IN_MILLISECONDS,
-                configuration.getThreadPoolRollingNumberStatisticalWindowInMilliseconds(), Integer.class) != null) {
+        if (exchange.getIn().getHeader(HystrixConstants.CAMEL_HYSTRIX_THREAD_POOL_METRICS_ROLLING_STATISTICAL_WINDOW_IN_MILLISECONDS,
+                configuration.getThreadPoolMetricsRollingStatisticalWindowInMilliseconds(), Integer.class) != null) {
             threadPoolProperties.withMetricsRollingStatisticalWindowInMilliseconds(
-                    exchange.getIn().getHeader(HystrixConstants.CAMEL_HYSTRIX_THREAD_POOL_ROLLING_NUMBER_STATISTICAL_WINDOW_IN_MILLISECONDS,
-                            configuration.getThreadPoolRollingNumberStatisticalWindowInMilliseconds(), Integer.class));
+                    exchange.getIn().getHeader(HystrixConstants.CAMEL_HYSTRIX_THREAD_POOL_METRICS_ROLLING_STATISTICAL_WINDOW_IN_MILLISECONDS,
+                            configuration.getThreadPoolMetricsRollingStatisticalWindowInMilliseconds(), Integer.class));
         }
 
         if (exchange.getIn().getHeader(HystrixConstants.CAMEL_HYSTRIX_THREAD_POOL_ROLLING_NUMBER_STATISTICAL_WINDOW_BUCKETS,
-                configuration.getThreadPoolRollingNumberStatisticalWindowBuckets(), Integer.class) != null) {
+                configuration.getThreadPoolMetricsRollingStatisticalWindowBuckets(), Integer.class) != null) {
             threadPoolProperties.withMetricsRollingStatisticalWindowBuckets(
                     exchange.getIn().getHeader(HystrixConstants.CAMEL_HYSTRIX_THREAD_POOL_ROLLING_NUMBER_STATISTICAL_WINDOW_BUCKETS,
-                            configuration.getThreadPoolRollingNumberStatisticalWindowBuckets(), Integer.class));
+                            configuration.getThreadPoolMetricsRollingStatisticalWindowBuckets(), Integer.class));
         }
     }