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 2023/12/16 16:38:29 UTC
(camel) 04/07: CAMEL-20242: camel-core: RouteController health check to be DOWN during starting routes. Supervising route controller option to be DOWN during restarting phase.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch rc
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 62a36d0361f380713f9123891734e29d179caf3f
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Dec 16 15:13:04 2023 +0100
CAMEL-20242: camel-core: RouteController health check to be DOWN during starting routes. Supervising route controller option to be DOWN during restarting phase.
---
.../src/main/java/org/apache/camel/spi/RouteController.java | 5 +++--
.../main/java/org/apache/camel/spi/SupervisingRouteController.java | 4 ++--
.../java/org/apache/camel/impl/engine/InternalRouteController.java | 2 --
.../org/apache/camel/impl/health/RouteControllerHealthCheck.java | 1 -
4 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/RouteController.java b/core/camel-api/src/main/java/org/apache/camel/spi/RouteController.java
index d538eb77d97..7aace75c0f6 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/RouteController.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/RouteController.java
@@ -100,8 +100,9 @@ public interface RouteController extends CamelContextAware, StaticService {
boolean isStartingRoutes();
/**
- * Indicates if the route controller has routes that are unhealthy such as they have not yet been successfully started,
- * and if being supervised then the route can either be pending restarts or failed all restart attempts and are exhausted.
+ * Indicates if the route controller has routes that are unhealthy such as they have not yet been successfully
+ * started, and if being supervised then the route can either be pending restarts or failed all restart attempts and
+ * are exhausted.
*/
boolean isUnhealthyRoutes();
diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/SupervisingRouteController.java b/core/camel-api/src/main/java/org/apache/camel/spi/SupervisingRouteController.java
index a2018986e1b..f80e8248bda 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/SupervisingRouteController.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/SupervisingRouteController.java
@@ -174,8 +174,8 @@ public interface SupervisingRouteController extends RouteController {
Throwable getRestartException(String routeId);
/**
- * Whether the route controller is currently starting routes for the first time.
- * This only reports on the first time start phase.
+ * Whether the route controller is currently starting routes for the first time. This only reports on the first time
+ * start phase.
*/
boolean isStartingRoutes();
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/InternalRouteController.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/InternalRouteController.java
index e07a99760cd..a3e49591e8e 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/InternalRouteController.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/InternalRouteController.java
@@ -27,8 +27,6 @@ import org.apache.camel.spi.RouteController;
import org.apache.camel.spi.RouteError;
import org.apache.camel.spi.SupervisingRouteController;
-import static org.apache.camel.support.service.ServiceHelper.isStarted;
-
/**
* Internal {@link RouteController} used internally by {@link AbstractCamelContext}.
*/
diff --git a/core/camel-health/src/main/java/org/apache/camel/impl/health/RouteControllerHealthCheck.java b/core/camel-health/src/main/java/org/apache/camel/impl/health/RouteControllerHealthCheck.java
index 06b076e44f1..16b9b08caed 100644
--- a/core/camel-health/src/main/java/org/apache/camel/impl/health/RouteControllerHealthCheck.java
+++ b/core/camel-health/src/main/java/org/apache/camel/impl/health/RouteControllerHealthCheck.java
@@ -21,7 +21,6 @@ import java.util.Map;
import org.apache.camel.Ordered;
import org.apache.camel.health.HealthCheckResultBuilder;
import org.apache.camel.spi.RouteController;
-import org.apache.camel.support.service.ServiceHelper;
/**
* Readiness {@link org.apache.camel.health.HealthCheck} for route controller.