camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/4] git commit: CAMEL-6377: Optimized routing engine to reduce stack frames in use during routing. Work in progress.
Date Mon, 27 May 2013 08:01:05 GMT
CAMEL-6377: Optimized routing engine to reduce stack frames in use during routing. Work in
progress.


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

Branch: refs/heads/master
Commit: d1d95bf7587ecca15b3c5f07ed29ee04545de21e
Parents: f3b233d
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon May 27 05:03:22 2013 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon May 27 05:03:22 2013 +0200

----------------------------------------------------------------------
 .../org/apache/camel/processor/WrapProcessor.java  |   30 ---------------
 .../processor/interceptor/DefaultChannel.java      |    2 +-
 2 files changed, 1 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d1d95bf7/camel-core/src/main/java/org/apache/camel/processor/WrapProcessor.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/WrapProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/WrapProcessor.java
index 3eb629a..adb508a 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/WrapProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/WrapProcessor.java
@@ -18,11 +18,7 @@ package org.apache.camel.processor;
 
 import java.util.List;
 
-import org.apache.camel.AsyncCallback;
-import org.apache.camel.AsyncProcessor;
-import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
-import org.apache.camel.util.AsyncProcessorHelper;
 import org.apache.camel.util.ServiceHelper;
 
 /**
@@ -52,32 +48,6 @@ public class WrapProcessor extends DelegateAsyncProcessor {
     }
 
     @Override
-    public void process(Exchange exchange) throws Exception {
-        if (wrapped instanceof AsyncProcessor) {
-            AsyncProcessor async = (AsyncProcessor) wrapped;
-            AsyncProcessorHelper.process(async, exchange);
-        } else {
-            wrapped.process(exchange);
-        }
-    }
-
-    @Override
-    public boolean process(Exchange exchange, AsyncCallback callback) {
-        if (wrapped instanceof AsyncProcessor) {
-            AsyncProcessor async = (AsyncProcessor) wrapped;
-            return async.process(exchange, callback);
-        } else {
-            try {
-                wrapped.process(exchange);
-            } catch (Exception e) {
-                exchange.setException(e);
-            }
-            callback.done(true);
-            return true;
-        }
-    }
-
-    @Override
     protected void doStart() throws Exception {
         ServiceHelper.startService(wrapped);
         super.doStart();

http://git-wip-us.apache.org/repos/asf/camel/blob/d1d95bf7/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java
b/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java
index 9a68502..a6282fb 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java
@@ -262,7 +262,7 @@ public class DefaultChannel extends ServiceSupport implements ModelChannel
{
                 bridge.setTarget(wrapped);
                 wrapped = bridge;
             }
-            if (!(wrapped instanceof Service)) {
+            if (!(wrapped instanceof WrapProcessor)) {
                 // wrap the target so it becomes a service and we can manage its lifecycle
                 wrapped = new WrapProcessor(wrapped, target);
             }


Mime
View raw message