camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] camel git commit: make the SWFActivityConsumer's thread pool size configurable via SWFConfiguration.activityThreadPoolSize - the default activity thread pool size is 100, as per the aws-java-sdk
Date Thu, 19 Feb 2015 07:12:53 GMT
Repository: camel
Updated Branches:
  refs/heads/master ac5b1a5c4 -> f98f5c581


make the SWFActivityConsumer's thread pool size configurable via SWFConfiguration.activityThreadPoolSize
- the default activity thread pool size is 100, as per the aws-java-sdk


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

Branch: refs/heads/master
Commit: 91457b8daaa838bafe5b43eddff338618150ba99
Parents: ac5b1a5
Author: Steven Marcus <steven.marcus@gmail.com>
Authored: Thu Feb 19 17:12:13 2015 +1100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Feb 19 08:11:09 2015 +0100

----------------------------------------------------------------------
 .../apache/camel/component/aws/swf/SWFActivityConsumer.java  | 1 +
 .../org/apache/camel/component/aws/swf/SWFConfiguration.java | 8 ++++++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/91457b8d/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFActivityConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFActivityConsumer.java
b/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFActivityConsumer.java
index 0f47606..d5dff14 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFActivityConsumer.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFActivityConsumer.java
@@ -51,6 +51,7 @@ public class SWFActivityConsumer extends DefaultConsumer {
         CamelActivityImplementationFactory factory = new CamelActivityImplementationFactory(this,
configuration);
         genericWorker = new GenericActivityWorker(endpoint.getSWClient(), configuration.getDomainName(),
configuration.getActivityList());
         genericWorker.setActivityImplementationFactory(factory);
+        genericWorker.setTaskExecutorThreadPoolSize(configuration.getActivityThreadPoolSize());
         genericWorker.start();
         super.doStart();
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/91457b8d/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFConfiguration.java
b/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFConfiguration.java
index 4036996..6c7db6d 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFConfiguration.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFConfiguration.java
@@ -75,6 +75,8 @@ public class SWFConfiguration {
     private ActivityTypeRegistrationOptions activityTypeRegistrationOptions;
     @UriParam
     private WorkflowTypeRegistrationOptions workflowTypeRegistrationOptions;
+    @UriParam
+    private int activityThreadPoolSize = 100; // aws-sdk default
 
     public String getAccessKey() {
         return accessKey;
@@ -259,4 +261,10 @@ public class SWFConfiguration {
     public void setActivitySchedulingOptions(ActivitySchedulingOptions activitySchedulingOptions)
{
         this.activitySchedulingOptions = activitySchedulingOptions;
     }
+
+    public int getActivityThreadPoolSize() { return activityThreadPoolSize; }
+
+    public void setActivityThreadPoolSize(int activityThreadPoolSize) {
+        this.activityThreadPoolSize = activityThreadPoolSize;
+    }
 }


Mime
View raw message