camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] camel git commit: Improved camel-hystrix
Date Thu, 14 Apr 2016 09:23:02 GMT
Improved camel-hystrix


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

Branch: refs/heads/master
Commit: 0fa360171b927995476283082bc9bef70468c368
Parents: c3a34a7
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Apr 14 11:22:32 2016 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Apr 14 11:22:32 2016 +0200

----------------------------------------------------------------------
 .../camel/component/hystrix/HystrixConfiguration.java  | 13 +++++++------
 .../camel/component/hystrix/HystrixProducer.java       |  2 +-
 2 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/0fa36017/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 7b93019..74b1892 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
@@ -44,7 +44,8 @@ public class HystrixConfiguration {
     private String threadPoolKey;
 
     /**
-     * Specifies the cache key to use
+     * Specifies the cache key to use.
+     * Uses the simple language as the expression. But you can refer to an existing expression
using # lookup.
      */
     @UriParam(label = "producer")
     private String cacheKey;
@@ -73,7 +74,7 @@ public class HystrixConfiguration {
      * Whether to include a number of headers with metrics details of the circuit breaker
utilization
      */
     @UriParam(label = "producer")
-    private boolean metrics;
+    private boolean metricsEnabled;
 
     private Integer coreSize;
     private Integer keepAliveTime;
@@ -390,11 +391,11 @@ public class HystrixConfiguration {
         this.requestLogEnabled = requestLogEnabled;
     }
 
-    public boolean isMetrics() {
-        return metrics;
+    public boolean isMetricsEnabled() {
+        return metricsEnabled;
     }
 
-    public void setMetrics(boolean metrics) {
-        this.metrics = metrics;
+    public void setMetricsEnabled(boolean metricsEnabled) {
+        this.metricsEnabled = metricsEnabled;
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/0fa36017/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 09ac7b2..ba88c8c 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
@@ -73,7 +73,7 @@ public class HystrixProducer extends DefaultProducer {
         clearCache(camelHystrixCommand.getCommandKey(), exchange);
         camelHystrixCommand.execute();
 
-        if (configuration.isMetrics()) {
+        if (configuration.isMetricsEnabled()) {
             populateWithMetrics(exchange, camelHystrixCommand);
         }
     }


Mime
View raw message