You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2017/02/07 09:23:27 UTC

[10/10] camel git commit: Added clusterName option to Chronicle configuration to reflect the change in the API

Added clusterName option to Chronicle configuration to reflect the change in the API


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

Branch: refs/heads/master
Commit: d994bcd6ad6f6775093781a42fe0ebdfd79eab4d
Parents: ed90ca5
Author: Andrea Cosentino <an...@gmail.com>
Authored: Tue Feb 7 10:21:46 2017 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Tue Feb 7 10:21:46 2017 +0100

----------------------------------------------------------------------
 .../src/main/docs/chronicle-engine-component.adoc      |  5 +++--
 .../chronicle/engine/ChronicleEngineConfiguration.java | 13 +++++++++++++
 .../chronicle/engine/ChronicleEngineProducer.java      |  2 +-
 3 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d994bcd6/components/camel-chronicle/src/main/docs/chronicle-engine-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-chronicle/src/main/docs/chronicle-engine-component.adoc b/components/camel-chronicle/src/main/docs/chronicle-engine-component.adoc
index e16d870..71cdc84 100644
--- a/components/camel-chronicle/src/main/docs/chronicle-engine-component.adoc
+++ b/components/camel-chronicle/src/main/docs/chronicle-engine-component.adoc
@@ -9,7 +9,7 @@ The Chronicle Engine component has no options.
 
 
 // endpoint options: START
-The Chronicle Engine component supports 13 endpoint options which are listed below:
+The Chronicle Engine component supports 14 endpoint options which are listed below:
 
 {% raw %}
 [width="100%",cols="2,1,1m,1m,5",options="header"]
@@ -18,6 +18,7 @@ The Chronicle Engine component supports 13 endpoint options which are listed bel
 | addresses | common |  | String | *Required* Engine addresses. Multiple addresses can be separated by comman.
 | path | common |  | String | *Required* Engine path
 | action | common |  | String | The default action to perform valid values are: - PUBLISH - PPUBLISH_AND_INDEX - PPUT - PGET_AND_PUT - PPUT_ALL - PPUT_IF_ABSENT - PGET - PGET_AND_REMOVE - PREMOVE - PIS_EMPTY - PSIZE
+| clusterName | common |  | String | Cluster name for queue
 | filteredMapEvents | common |  | String | A comma separated list of Map event type to filer valid values are: INSERT UPDATE REMOVE.
 | persistent | common | true | boolean | Enable/disable data persistence
 | subscribeMapEvents | common | true | boolean | Set if consumer should subscribe to Map events default true.
@@ -30,4 +31,4 @@ The Chronicle Engine component supports 13 endpoint options which are listed bel
 | synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
 |=======================================================================
 {% endraw %}
-// endpoint options: END
\ No newline at end of file
+// endpoint options: END

http://git-wip-us.apache.org/repos/asf/camel/blob/d994bcd6/components/camel-chronicle/src/main/java/org/apache/camel/component/chronicle/engine/ChronicleEngineConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-chronicle/src/main/java/org/apache/camel/component/chronicle/engine/ChronicleEngineConfiguration.java b/components/camel-chronicle/src/main/java/org/apache/camel/component/chronicle/engine/ChronicleEngineConfiguration.java
index 6b76ee9..ab56b95 100644
--- a/components/camel-chronicle/src/main/java/org/apache/camel/component/chronicle/engine/ChronicleEngineConfiguration.java
+++ b/components/camel-chronicle/src/main/java/org/apache/camel/component/chronicle/engine/ChronicleEngineConfiguration.java
@@ -37,6 +37,8 @@ public class ChronicleEngineConfiguration {
     private String action;
     @UriParam(defaultValue = "true")
     private boolean persistent = true;
+    @UriParam
+    private String clusterName;
 
     // ****************************
     // CLIENT OPTIONS
@@ -159,4 +161,15 @@ public class ChronicleEngineConfiguration {
     public void setPersistent(boolean persistent) {
         this.persistent = persistent;
     }
+
+	public String getClusterName() {
+		return clusterName;
+	}
+
+    /**
+     * Cluster name for queue
+     */
+	public void setClusterName(String clusterName) {
+		this.clusterName = clusterName;
+	}
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d994bcd6/components/camel-chronicle/src/main/java/org/apache/camel/component/chronicle/engine/ChronicleEngineProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-chronicle/src/main/java/org/apache/camel/component/chronicle/engine/ChronicleEngineProducer.java b/components/camel-chronicle/src/main/java/org/apache/camel/component/chronicle/engine/ChronicleEngineProducer.java
index c8513d4..2c35823 100644
--- a/components/camel-chronicle/src/main/java/org/apache/camel/component/chronicle/engine/ChronicleEngineProducer.java
+++ b/components/camel-chronicle/src/main/java/org/apache/camel/component/chronicle/engine/ChronicleEngineProducer.java
@@ -47,7 +47,7 @@ public class ChronicleEngineProducer extends HeaderSelectorProducer {
         this.topicPublisher = WeakRef.create(() -> client.acquireTopicPublisher(uri, Object.class, Object.class));
         this.publisher = WeakRef.create(() -> client.acquirePublisher(uri, Object.class));
         this.mapView = WeakRef.create(() -> client.acquireMap(uri, Object.class, Object.class));
-        this.queueView = WeakRef.create(() -> client.acquireQueue(uri, Object.class, Object.class));
+        this.queueView = WeakRef.create(() -> client.acquireQueue(uri, Object.class, Object.class, endpoint.getConfiguration().getClusterName()));
     }
 
     // ***************************