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:32 UTC

[camel] branch master updated (526a1a1 -> 3404fa1)

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

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


    from 526a1a1  Regen and sync deps
     new 43d3c32  CAMEL-15930: ClusteredRouteController cannot start clustered routes
     new 3404fa1  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] 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 master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 3404fa1f85238556ef7d38885f1b71a38c76b2f2
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 bde0770..92e8543 100644
--- a/core/camel-cluster/pom.xml
+++ b/core/camel-cluster/pom.xml
@@ -36,6 +36,7 @@
         <firstVersion>3.2.0</firstVersion>
         <label>core</label>
         <camel-prepare-component>false</camel-prepare-component>
+        <supportLevel>preview</supportLevel>
     </properties>
 
     <dependencies>


[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 master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 43d3c32077b7e8bbd04a46d28ccf128483ca8e57
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
     // *******************************