You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/12/14 08:22:47 UTC

[camel] branch camel-3.7.x updated (a8bb0d3 -> 12c5799)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch camel-3.7.x
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from a8bb0d3  Fix SimpleMain oversight on doStop method (#4759)
     new 2f3fc9f  CAMEL-15930: ClusteredRouteController cannot start clustered routes
     new 12c5799  Polished

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 core/camel-cluster/pom.xml                         |  1 +
 .../impl/cluster/ClusteredRouteController.java     | 78 +---------------------
 2 files changed, 4 insertions(+), 75 deletions(-)


[camel] 01/02: CAMEL-15930: ClusteredRouteController cannot start clustered routes

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-3.7.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 2f3fc9fa996a4bda50bc958be4302bccb8589f6d
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Dec 12 11:58:02 2020 +0100

    CAMEL-15930: ClusteredRouteController cannot start clustered routes
---
 .../impl/cluster/ClusteredRouteController.java     | 78 +---------------------
 1 file changed, 3 insertions(+), 75 deletions(-)

diff --git a/core/camel-cluster/src/main/java/org/apache/camel/impl/cluster/ClusteredRouteController.java b/core/camel-cluster/src/main/java/org/apache/camel/impl/cluster/ClusteredRouteController.java
index 5811a3d..84462c9 100644
--- a/core/camel-cluster/src/main/java/org/apache/camel/impl/cluster/ClusteredRouteController.java
+++ b/core/camel-cluster/src/main/java/org/apache/camel/impl/cluster/ClusteredRouteController.java
@@ -27,11 +27,9 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
 import org.apache.camel.CamelContext;
-import org.apache.camel.Experimental;
 import org.apache.camel.NamedNode;
 import org.apache.camel.Route;
 import org.apache.camel.RuntimeCamelException;
@@ -47,7 +45,9 @@ import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@Experimental
+/**
+ * Clustered {@link org.apache.camel.spi.RouteController}.
+ */
 public class ClusteredRouteController extends DefaultRouteController {
     private static final Logger LOGGER = LoggerFactory.getLogger(ClusteredRouteController.class);
 
@@ -215,78 +215,6 @@ public class ClusteredRouteController extends DefaultRouteController {
     }
 
     // *******************************
-    // Route operations are disabled
-    // *******************************
-
-    @Override
-    public void startRoute(String routeId) throws Exception {
-        failIfClustered(routeId);
-
-        // Delegate to default impl.
-        super.startRoute(routeId);
-    }
-
-    @Override
-    public void stopRoute(String routeId) throws Exception {
-        failIfClustered(routeId);
-
-        // Delegate to default impl.
-        super.stopRoute(routeId);
-    }
-
-    @Override
-    public void stopRoute(String routeId, long timeout, TimeUnit timeUnit) throws Exception {
-        failIfClustered(routeId);
-
-        // Delegate to default impl.
-        super.stopRoute(routeId, timeout, timeUnit);
-    }
-
-    @Override
-    public boolean stopRoute(String routeId, long timeout, TimeUnit timeUnit, boolean abortAfterTimeout) throws Exception {
-        failIfClustered(routeId);
-
-        // Delegate to default impl.
-        return super.stopRoute(routeId, timeout, timeUnit, abortAfterTimeout);
-    }
-
-    @Override
-    public void suspendRoute(String routeId) throws Exception {
-        failIfClustered(routeId);
-
-        // Delegate to default impl.
-        super.suspendRoute(routeId);
-    }
-
-    @Override
-    public void suspendRoute(String routeId, long timeout, TimeUnit timeUnit) throws Exception {
-        failIfClustered(routeId);
-
-        // Delegate to default impl.
-        super.suspendRoute(routeId, timeout, timeUnit);
-    }
-
-    @Override
-    public void resumeRoute(String routeId) throws Exception {
-        failIfClustered(routeId);
-
-        // Delegate to default impl.
-        super.resumeRoute(routeId);
-    }
-
-    // *******************************
-    // Helpers
-    // *******************************
-
-    private void failIfClustered(String routeId) {
-        // Can't perform action on routes managed by this controller as they
-        // are clustered and they may be part of the same view.
-        if (routes.contains(routeId)) {
-            throw new UnsupportedOperationException("Operation not supported as route " + routeId + " is clustered");
-        }
-    }
-
-    // *******************************
     // Factories
     // *******************************
 


[camel] 02/02: Polished

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-3.7.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 12c57991904f4e024018814ea8a288e1f8f0d63d
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Dec 12 16:49:39 2020 +0100

    Polished
---
 core/camel-cluster/pom.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/core/camel-cluster/pom.xml b/core/camel-cluster/pom.xml
index d46784b..235c85f 100644
--- a/core/camel-cluster/pom.xml
+++ b/core/camel-cluster/pom.xml
@@ -37,6 +37,7 @@
         <firstVersion>3.2.0</firstVersion>
         <label>core</label>
         <camel-prepare-component>false</camel-prepare-component>
+        <supportLevel>preview</supportLevel>
     </properties>
 
     <dependencies>