camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [2/2] git commit: CAMEL-7422 Polish the comments and code
Date Wed, 04 Jun 2014 03:52:14 GMT
CAMEL-7422 Polish the comments and code


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

Branch: refs/heads/master
Commit: 8a122a1bb086082c0b2600e80792532d8960ffc4
Parents: cd2f494
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Wed Jun 4 11:44:26 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Wed Jun 4 11:44:26 2014 +0800

----------------------------------------------------------------------
 .../component/rabbitmq/RabbitMQConsumer.java    |  8 ++--
 .../component/rabbitmq/RabbitMQEndpoint.java    | 50 ++++++++++----------
 2 files changed, 29 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/8a122a1b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
index 5d3adf4..8a9b624 100644
--- a/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
+++ b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java
@@ -53,10 +53,10 @@ public class RabbitMQConsumer extends DefaultConsumer {
         channel = conn.createChannel();
         log.debug("Using channel {}", channel);
 
-	if (endpoint.isPrefetchEnabled()) {
-	    channel.basicQos(endpoint.getPrefetchSize(), 
-		    endpoint.getPrefetchCount(), endpoint.isPrefetchGlobal());
-	}
+        if (endpoint.isPrefetchEnabled()) {
+            channel.basicQos(endpoint.getPrefetchSize(), 
+                             endpoint.getPrefetchCount(), endpoint.isPrefetchGlobal());
+        }
         
         channel.exchangeDeclare(endpoint.getExchangeName(),
                 endpoint.getExchangeType(),

http://git-wip-us.apache.org/repos/asf/camel/blob/8a122a1b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
index 11186ce..9400935 100644
--- a/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
+++ b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
@@ -72,13 +72,13 @@ public class RabbitMQEndpoint extends DefaultEndpoint {
     private Integer networkRecoveryInterval;
     private Boolean topologyRecoveryEnabled;
     
-    //Define will be used basicOqs
-    private boolean prefetchEnabled = false;
+    //If it is true, prefetchSize, prefetchCount, prefetchGlobal will be used for basicOqs
before starting RabbitMQConsumer
+    private boolean prefetchEnabled;
     //Default in RabbitMq is 0.
-    private Integer prefetchSize = 0;
-    private Integer prefetchCount = 0;
-    //Default vaule in RabbitMQ is false.
-    private boolean prefetchGlobal = false;
+    private int prefetchSize;
+    private int prefetchCount;
+    //Default value in RabbitMQ is false.
+    private boolean prefetchGlobal;
     
     public RabbitMQEndpoint() {
     }
@@ -408,34 +408,34 @@ public class RabbitMQEndpoint extends DefaultEndpoint {
     }
 
     public boolean isPrefetchEnabled() {
-	return prefetchEnabled;
+        return prefetchEnabled;
     }
-    
+
     public void setPrefetchEnabled(boolean prefetchEnabled) {
-	this.prefetchEnabled = prefetchEnabled;
+        this.prefetchEnabled = prefetchEnabled;
     }
-    
-    public void setPrefetchSize(Integer prefetchSize) {
-	this.prefetchSize = prefetchSize;
+
+    public void setPrefetchSize(int prefetchSize) {
+        this.prefetchSize = prefetchSize;
     }
-    
-    public Integer getPrefetchSize() {
-	return prefetchSize;
+
+    public int getPrefetchSize() {
+        return prefetchSize;
     }
-    
-    public void setPrefetchCount(Integer prefetchCount) {
-	this.prefetchCount = prefetchCount;
+
+    public void setPrefetchCount(int prefetchCount) {
+        this.prefetchCount = prefetchCount;
     }
-    
-    public Integer getPrefetchCount() {
-	return prefetchCount;
+
+    public int getPrefetchCount() {
+        return prefetchCount;
     }
-    
+
     public void setPrefetchGlobal(boolean prefetchGlobal) {
-	this.prefetchGlobal = prefetchGlobal;
+        this.prefetchGlobal = prefetchGlobal;
     }
-    
+
     public boolean isPrefetchGlobal() {
-	return prefetchGlobal;
+        return prefetchGlobal;
     }
 }


Mime
View raw message