This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 6ff42ff CAMEL-17638: EIP model options with old fashioned naming
xxxRef style should be made modern style.
6ff42ff is described below
commit 6ff42ff373ec67b45b0dbbbf8b4d7521876dff8e
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Feb 24 15:47:48 2022 +0100
CAMEL-17638: EIP model options with old fashioned naming xxxRef style
should be made modern style.
---
.../models/faultToleranceConfiguration.json | 6 ++--
.../catalog/models/resilience4jConfiguration.json | 4 +--
.../apache/camel/catalog/schemas/camel-spring.xsd | 12 +++----
.../faulttolerance/FaultToleranceReifier.java | 8 ++---
.../FaultToleranceTimeoutThreadPoolTest.java | 2 +-
.../component/resilience4j/ResilienceReifier.java | 8 ++---
.../ResilienceExistingCircuitBreakerTest.java | 4 +--
.../ResilienceTimeoutThreadPoolTest.java | 2 +-
...ToleranceConfigurationDefinitionConfigurer.java | 42 +++++++++++-----------
...ilience4jConfigurationDefinitionConfigurer.java | 42 +++++++++++-----------
.../camel/model/faultToleranceConfiguration.json | 6 ++--
.../camel/model/resilience4jConfiguration.json | 4 +--
.../model/FaultToleranceConfigurationCommon.java | 36 +++++++++----------
.../FaultToleranceConfigurationDefinition.java | 12 +++----
.../model/Resilience4jConfigurationCommon.java | 36 +++++++++----------
.../model/Resilience4jConfigurationDefinition.java | 12 +++----
.../java/org/apache/camel/xml/in/ModelParser.java | 12 +++----
.../ROOT/pages/camel-3x-upgrade-guide-3_16.adoc | 7 ++++
.../dsl/yaml/deserializers/ModelDeserializers.java | 30 ++++++++--------
.../src/generated/resources/camel-yaml-dsl.json | 10 +++---
.../src/generated/resources/camelYamlDsl.json | 10 +++---
21 files changed, 156 insertions(+), 149 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/faultToleranceConfiguration.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/faultToleranceConfiguration.json
index 65da1b9..b656bc9 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/faultToleranceConfiguration.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/faultToleranceConfiguration.json
@@ -12,7 +12,7 @@
"output": false
},
"properties": {
- "circuitBreakerRef": { "kind": "attribute", "displayName": "Circuit
Breaker Ref", "label": "circuitbreaker", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Refers to an existing
io.smallrye.faulttolerance.core.circuit.breaker.CircuitBreaker instance to
lookup and use from the registry. When using this, then any other circuit
breaker options are not in use." },
+ "circuitBreaker": { "kind": "attribute", "displayName": "Circuit Breaker",
"label": "circuitbreaker", "required": false, "type": "object", "javaType":
"io.smallrye.faulttolerance.core.circuit.breaker.CircuitBreaker", "deprecated":
false, "autowired": false, "secret": false, "description": "Refers to an
existing io.smallrye.faulttolerance.core.circuit.breaker.CircuitBreaker
instance to lookup and use from the registry. When using this, then any other
circuit breaker options are not in [...]
"delay": { "kind": "attribute", "displayName": "Delay", "label":
"circuitbreaker", "required": false, "type": "duration", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "5000", "description": "Control how long the circuit breaker
stays open. The default is 5 seconds." },
"successThreshold": { "kind": "attribute", "displayName": "Success
Threshold", "label": "circuitbreaker", "required": false, "type": "integer",
"javaType": "java.lang.Integer", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "1", "description": "Controls the number of
trial calls which are allowed when the circuit breaker is half-open" },
"requestVolumeThreshold": { "kind": "attribute", "displayName": "Request
Volume Threshold", "label": "circuitbreaker", "required": false, "type":
"integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "20", "description": "Controls the size
of the rolling window used when the circuit breaker is closed" },
@@ -20,11 +20,11 @@
"timeoutEnabled": { "kind": "attribute", "displayName": "Timeout Enabled",
"label": "timeout", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether timeout is enabled or not on the
circuit breaker. Default is false." },
"timeoutDuration": { "kind": "attribute", "displayName": "Timeout
Duration", "label": "timeout", "required": false, "type": "duration",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "1000", "description": "Configures the thread
execution timeout. Default value is 1 second." },
"timeoutPoolSize": { "kind": "attribute", "displayName": "Timeout Pool
Size", "label": "timeout", "required": false, "type": "integer", "javaType":
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "10", "description": "Configures the pool size of the thread
pool when timeout is enabled. Default value is 10." },
- "timeoutScheduledExecutorServiceRef": { "kind": "attribute",
"displayName": "Timeout Scheduled Executor Service Ref", "label": "timeout",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description":
"References to a custom thread pool to use when timeout is enabled" },
+ "timeoutScheduledExecutorService": { "kind": "attribute", "displayName":
"Timeout Scheduled Executor Service", "label": "timeout", "required": false,
"type": "object", "javaType": "java.util.concurrent.ScheduledExecutorService",
"deprecated": false, "autowired": false, "secret": false, "description":
"References to a custom thread pool to use when timeout is enabled" },
"bulkheadEnabled": { "kind": "attribute", "displayName": "Bulkhead
Enabled", "label": "bulkhead", "required": false, "type": "boolean",
"javaType": "java.lang.Boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "description": "Whether bulkhead is
enabled or not on the circuit breaker. Default is false." },
"bulkheadMaxConcurrentCalls": { "kind": "attribute", "displayName":
"Bulkhead Max Concurrent Calls", "label": "bulkhead", "required": false,
"type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "10", "description":
"Configures the max amount of concurrent calls the bulkhead will support." },
"bulkheadWaitingTaskQueue": { "kind": "attribute", "displayName":
"Bulkhead Waiting Task Queue", "label": "bulkhead", "required": false, "type":
"integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "10", "description": "Configures the
task queue size for holding waiting tasks to be processed by the bulkhead." },
- "bulkheadExecutorServiceRef": { "kind": "attribute", "displayName":
"Bulkhead Executor Service Ref", "label": "bulkhead", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "References to a custom
thread pool to use when bulkhead is enabled." },
+ "bulkheadExecutorService": { "kind": "attribute", "displayName": "Bulkhead
Executor Service", "label": "bulkhead", "required": false, "type": "object",
"javaType": "java.util.concurrent.ExecutorService", "deprecated": false,
"autowired": false, "secret": false, "description": "References to a custom
thread pool to use when bulkhead is enabled." },
"id": { "kind": "attribute", "displayName": "Id", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "The id of this node" }
}
}
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/resilience4jConfiguration.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/resilience4jConfiguration.json
index 8f3e0bd..5dd9d98 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/resilience4jConfiguration.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/resilience4jConfiguration.json
@@ -12,8 +12,8 @@
"output": false
},
"properties": {
- "circuitBreakerRef": { "kind": "attribute", "displayName": "Circuit
Breaker Ref", "label": "circuitbreaker", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreaker instance to lookup and use
from the registry. When using this, then any other circuit breaker options are
not in use." },
- "configRef": { "kind": "attribute", "displayName": "Config Ref", "label":
"circuitbreaker", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry." },
+ "circuitBreaker": { "kind": "attribute", "displayName": "Circuit Breaker",
"label": "circuitbreaker", "required": false, "type": "object", "javaType":
"io.github.resilience4j.circuitbreaker.CircuitBreaker", "deprecated": false,
"autowired": false, "secret": false, "description": "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreaker instance to lookup and use
from the registry. When using this, then any other circuit breaker options are
not in use." },
+ "config": { "kind": "attribute", "displayName": "Config", "label":
"circuitbreaker", "required": false, "type": "object", "javaType":
"io.github.resilience4j.circuitbreaker.CircuitBreakerConfig", "deprecated":
false, "autowired": false, "secret": false, "description": "Refers to an
existing io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to
lookup and use from the registry." },
"failureRateThreshold": { "kind": "attribute", "displayName": "Failure
Rate Threshold", "label": "circuitbreaker", "required": false, "type":
"number", "javaType": "java.lang.Float", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "50", "description": "Configures the
failure rate threshold in percentage. If the failure rate is equal or greater
than the threshold the CircuitBreaker transitions to open and starts
short-circuiting calls. The threshold must be g [...]
"permittedNumberOfCallsInHalfOpenState": { "kind": "attribute",
"displayName": "Permitted Number Of Calls In Half Open State", "label":
"circuitbreaker", "required": false, "type": "integer", "javaType":
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "10", "description": "Configures the number of permitted calls
when the CircuitBreaker is half open. The size must be greater than 0. Default
size is 10." },
"slidingWindowSize": { "kind": "attribute", "displayName": "Sliding Window
Size", "label": "circuitbreaker", "required": false, "type": "integer",
"javaType": "java.lang.Integer", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "100", "description": "Configures the size of
the sliding window which is used to record the outcome of calls when the
CircuitBreaker is closed. slidingWindowSize configures the size of the sliding
window. Sliding window can either be [...]
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
index 6a9e638..40cc62f 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
@@ -4173,11 +4173,11 @@ equal to, or higher, than coreSize. Default value: false
<xs:element minOccurs="0" name="bulkheadMaxConcurrentCalls"
type="xs:string"/>
<xs:element minOccurs="0" name="bulkheadMaxWaitDuration"
type="xs:string"/>
<xs:element minOccurs="0" name="timeoutEnabled" type="xs:string"/>
- <xs:element minOccurs="0" name="timeoutExecutorServiceRef"
type="xs:string"/>
+ <xs:element minOccurs="0" name="timeoutExecutorService"
type="xs:string"/>
<xs:element minOccurs="0" name="timeoutDuration" type="xs:string"/>
<xs:element minOccurs="0" name="timeoutCancelRunningFuture"
type="xs:string"/>
</xs:sequence>
- <xs:attribute name="circuitBreakerRef" type="xs:string">
+ <xs:attribute name="circuitBreaker" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
Refers to an existing io.github.resilience4j.circuitbreaker.CircuitBreaker
@@ -4186,7 +4186,7 @@ circuit breaker options are not in use.
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="configRef" type="xs:string">
+ <xs:attribute name="config" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig
@@ -4318,7 +4318,7 @@ Default value: 60
<xs:complexContent>
<xs:extension base="tns:identifiedType">
<xs:sequence/>
- <xs:attribute name="circuitBreakerRef" type="xs:string">
+ <xs:attribute name="circuitBreaker" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
Refers to an existing
@@ -4386,7 +4386,7 @@ value is 10. Default value: 10
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="timeoutScheduledExecutorServiceRef"
type="xs:string">
+ <xs:attribute name="timeoutScheduledExecutorService" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
References to a custom thread pool to use when timeout is enabled.
@@ -4417,7 +4417,7 @@ bulkhead. Default value: 10
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="bulkheadExecutorServiceRef" type="xs:string">
+ <xs:attribute name="bulkheadExecutorService" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
References to a custom thread pool to use when bulkhead is enabled.
diff --git
a/components/camel-microprofile/camel-microprofile-fault-tolerance/src/main/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceReifier.java
b/components/camel-microprofile/camel-microprofile-fault-tolerance/src/main/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceReifier.java
index ee7411d..48e864d 100644
---
a/components/camel-microprofile/camel-microprofile-fault-tolerance/src/main/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceReifier.java
+++
b/components/camel-microprofile/camel-microprofile-fault-tolerance/src/main/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceReifier.java
@@ -64,8 +64,8 @@ public class FaultToleranceReifier extends
ProcessorReifier<CircuitBreakerDefini
FaultToleranceProcessor answer = new
FaultToleranceProcessor(configuration, processor, fallback);
// using any existing circuit breakers?
- if (config.getCircuitBreakerRef() != null) {
- CircuitBreaker cb =
mandatoryLookup(parseString(config.getCircuitBreakerRef()),
CircuitBreaker.class);
+ if (config.getCircuitBreaker() != null) {
+ CircuitBreaker cb =
mandatoryLookup(parseString(config.getCircuitBreaker()), CircuitBreaker.class);
answer.setCircuitBreaker(cb);
}
configureBulkheadExecutorService(answer, config);
@@ -113,8 +113,8 @@ public class FaultToleranceReifier extends
ProcessorReifier<CircuitBreakerDefini
return;
}
- if (config.getBulkheadExecutorServiceRef() != null) {
- String ref = config.getBulkheadExecutorServiceRef();
+ if (config.getBulkheadExecutorService() != null) {
+ String ref = config.getBulkheadExecutorService();
boolean shutdownThreadPool = false;
ExecutorService executorService = lookup(ref,
ExecutorService.class);
if (executorService == null) {
diff --git
a/components/camel-microprofile/camel-microprofile-fault-tolerance/src/test/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceTimeoutThreadPoolTest.java
b/components/camel-microprofile/camel-microprofile-fault-tolerance/src/test/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceTimeoutThreadPoolTest.java
index 60d3435..ced46e4 100644
---
a/components/camel-microprofile/camel-microprofile-fault-tolerance/src/test/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceTimeoutThreadPoolTest.java
+++
b/components/camel-microprofile/camel-microprofile-fault-tolerance/src/test/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceTimeoutThreadPoolTest.java
@@ -104,7 +104,7 @@ public class FaultToleranceTimeoutThreadPoolTest extends
CamelTestSupport {
from("direct:start").circuitBreaker()
// enable and use 2 second timeout
.faultToleranceConfiguration().timeoutEnabled(true).timeoutDuration(2000)
-
.timeoutScheduledExecutorServiceRef("myThreadPool").end()
+ .timeoutScheduledExecutorService("myThreadPool").end()
.log("FaultTolerance processing start:
${threadName}").toD("direct:${body}")
.log("FaultTolerance processing end:
${threadName}").end().log("After Fault Tolerance ${body}");
diff --git
a/components/camel-resilience4j/src/main/java/org/apache/camel/component/resilience4j/ResilienceReifier.java
b/components/camel-resilience4j/src/main/java/org/apache/camel/component/resilience4j/ResilienceReifier.java
index c65eb29..0da002e 100644
---
a/components/camel-resilience4j/src/main/java/org/apache/camel/component/resilience4j/ResilienceReifier.java
+++
b/components/camel-resilience4j/src/main/java/org/apache/camel/component/resilience4j/ResilienceReifier.java
@@ -67,8 +67,8 @@ public class ResilienceReifier extends
ProcessorReifier<CircuitBreakerDefinition
ResilienceProcessor answer = new ResilienceProcessor(cbConfig,
bhConfig, tlConfig, processor, fallback);
configureTimeoutExecutorService(answer, config);
// using any existing circuit breakers?
- if (config.getCircuitBreakerRef() != null) {
- CircuitBreaker cb =
mandatoryLookup(parseString(config.getCircuitBreakerRef()),
CircuitBreaker.class);
+ if (config.getCircuitBreaker() != null) {
+ CircuitBreaker cb =
mandatoryLookup(parseString(config.getCircuitBreaker()), CircuitBreaker.class);
answer.setCircuitBreaker(cb);
}
return answer;
@@ -150,8 +150,8 @@ public class ResilienceReifier extends
ProcessorReifier<CircuitBreakerDefinition
return;
}
- if (config.getTimeoutExecutorServiceRef() != null) {
- String ref = config.getTimeoutExecutorServiceRef();
+ if (config.getTimeoutExecutorService() != null) {
+ String ref = config.getTimeoutExecutorService();
boolean shutdownThreadPool = false;
ExecutorService executorService = lookup(ref,
ExecutorService.class);
if (executorService == null) {
diff --git
a/components/camel-resilience4j/src/test/java/org/apache/camel/component/resilience4j/ResilienceExistingCircuitBreakerTest.java
b/components/camel-resilience4j/src/test/java/org/apache/camel/component/resilience4j/ResilienceExistingCircuitBreakerTest.java
index 7ce7a28..14972f6 100644
---
a/components/camel-resilience4j/src/test/java/org/apache/camel/component/resilience4j/ResilienceExistingCircuitBreakerTest.java
+++
b/components/camel-resilience4j/src/test/java/org/apache/camel/component/resilience4j/ResilienceExistingCircuitBreakerTest.java
@@ -65,12 +65,12 @@ public class ResilienceExistingCircuitBreakerTest extends
CamelTestSupport {
@Override
public void configure() throws Exception {
from("direct:start").to("log:start").circuitBreaker().resilience4jConfiguration()
- .circuitBreakerRef("myCircuitBreaker").end()
+ .circuitBreaker("myCircuitBreaker").end()
.throwException(new
IllegalArgumentException("Forced")).onFallback().transform()
.constant("Fallback
message").end().to("log:result").to("mock:result");
from("direct:start.with.timeout.enabled").to("log:direct:start.with.timeout.enabled").circuitBreaker().resilience4jConfiguration()
-
.circuitBreakerRef("myCircuitBreaker").timeoutEnabled(true).timeoutDuration(2000).end()
+
.circuitBreaker("myCircuitBreaker").timeoutEnabled(true).timeoutDuration(2000).end()
.throwException(new
IllegalArgumentException("Forced")).onFallback().transform()
.constant("Fallback
message").end().to("log:result").to("mock:result");
}
diff --git
a/components/camel-resilience4j/src/test/java/org/apache/camel/component/resilience4j/ResilienceTimeoutThreadPoolTest.java
b/components/camel-resilience4j/src/test/java/org/apache/camel/component/resilience4j/ResilienceTimeoutThreadPoolTest.java
index f6c172a..6b02a40 100644
---
a/components/camel-resilience4j/src/test/java/org/apache/camel/component/resilience4j/ResilienceTimeoutThreadPoolTest.java
+++
b/components/camel-resilience4j/src/test/java/org/apache/camel/component/resilience4j/ResilienceTimeoutThreadPoolTest.java
@@ -105,7 +105,7 @@ public class ResilienceTimeoutThreadPoolTest extends
CamelTestSupport {
from("direct:start").circuitBreaker()
// enable and use 2 second timeout
.resilience4jConfiguration().timeoutEnabled(true).timeoutDuration(2000)
- .timeoutExecutorServiceRef("myThreadPool").end()
+ .timeoutExecutorService("myThreadPool").end()
.log("Resilience processing start:
${threadName}").toD("direct:${body}")
.log("Resilience processing end:
${threadName}").end().log("After Resilience ${body}");
diff --git
a/core/camel-core-model/src/generated/java/org/apache/camel/model/FaultToleranceConfigurationDefinitionConfigurer.java
b/core/camel-core-model/src/generated/java/org/apache/camel/model/FaultToleranceConfigurationDefinitionConfigurer.java
index 9f905b3..384b985 100644
---
a/core/camel-core-model/src/generated/java/org/apache/camel/model/FaultToleranceConfigurationDefinitionConfigurer.java
+++
b/core/camel-core-model/src/generated/java/org/apache/camel/model/FaultToleranceConfigurationDefinitionConfigurer.java
@@ -21,10 +21,10 @@ public class
FaultToleranceConfigurationDefinitionConfigurer extends org.apache.
static {
Map<String, Object> map = new CaseInsensitiveMap();
map.put("BulkheadEnabled", java.lang.String.class);
- map.put("BulkheadExecutorServiceRef", java.lang.String.class);
+ map.put("BulkheadExecutorService", java.lang.String.class);
map.put("BulkheadMaxConcurrentCalls", java.lang.String.class);
map.put("BulkheadWaitingTaskQueue", java.lang.String.class);
- map.put("CircuitBreakerRef", java.lang.String.class);
+ map.put("CircuitBreaker", java.lang.String.class);
map.put("Delay", java.lang.String.class);
map.put("FailureRatio", java.lang.String.class);
map.put("Id", java.lang.String.class);
@@ -33,7 +33,7 @@ public class FaultToleranceConfigurationDefinitionConfigurer
extends org.apache.
map.put("TimeoutDuration", java.lang.String.class);
map.put("TimeoutEnabled", java.lang.String.class);
map.put("TimeoutPoolSize", java.lang.String.class);
- map.put("TimeoutScheduledExecutorServiceRef", java.lang.String.class);
+ map.put("TimeoutScheduledExecutorService", java.lang.String.class);
ALL_OPTIONS = map;
}
@@ -43,14 +43,14 @@ public class
FaultToleranceConfigurationDefinitionConfigurer extends org.apache.
switch (ignoreCase ? name.toLowerCase() : name) {
case "bulkheadenabled":
case "BulkheadEnabled":
target.setBulkheadEnabled(property(camelContext, java.lang.String.class,
value)); return true;
- case "bulkheadexecutorserviceref":
- case "BulkheadExecutorServiceRef":
target.setBulkheadExecutorServiceRef(property(camelContext,
java.lang.String.class, value)); return true;
+ case "bulkheadexecutorservice":
+ case "BulkheadExecutorService":
target.setBulkheadExecutorService(property(camelContext,
java.lang.String.class, value)); return true;
case "bulkheadmaxconcurrentcalls":
case "BulkheadMaxConcurrentCalls":
target.setBulkheadMaxConcurrentCalls(property(camelContext,
java.lang.String.class, value)); return true;
case "bulkheadwaitingtaskqueue":
case "BulkheadWaitingTaskQueue":
target.setBulkheadWaitingTaskQueue(property(camelContext,
java.lang.String.class, value)); return true;
- case "circuitbreakerref":
- case "CircuitBreakerRef":
target.setCircuitBreakerRef(property(camelContext, java.lang.String.class,
value)); return true;
+ case "circuitbreaker":
+ case "CircuitBreaker": target.setCircuitBreaker(property(camelContext,
java.lang.String.class, value)); return true;
case "delay":
case "Delay": target.setDelay(property(camelContext,
java.lang.String.class, value)); return true;
case "failureratio":
@@ -67,8 +67,8 @@ public class FaultToleranceConfigurationDefinitionConfigurer
extends org.apache.
case "TimeoutEnabled": target.setTimeoutEnabled(property(camelContext,
java.lang.String.class, value)); return true;
case "timeoutpoolsize":
case "TimeoutPoolSize":
target.setTimeoutPoolSize(property(camelContext, java.lang.String.class,
value)); return true;
- case "timeoutscheduledexecutorserviceref":
- case "TimeoutScheduledExecutorServiceRef":
target.setTimeoutScheduledExecutorServiceRef(property(camelContext,
java.lang.String.class, value)); return true;
+ case "timeoutscheduledexecutorservice":
+ case "TimeoutScheduledExecutorService":
target.setTimeoutScheduledExecutorService(property(camelContext,
java.lang.String.class, value)); return true;
default: return false;
}
}
@@ -83,14 +83,14 @@ public class
FaultToleranceConfigurationDefinitionConfigurer extends org.apache.
switch (ignoreCase ? name.toLowerCase() : name) {
case "bulkheadenabled":
case "BulkheadEnabled": return java.lang.String.class;
- case "bulkheadexecutorserviceref":
- case "BulkheadExecutorServiceRef": return java.lang.String.class;
+ case "bulkheadexecutorservice":
+ case "BulkheadExecutorService": return java.lang.String.class;
case "bulkheadmaxconcurrentcalls":
case "BulkheadMaxConcurrentCalls": return java.lang.String.class;
case "bulkheadwaitingtaskqueue":
case "BulkheadWaitingTaskQueue": return java.lang.String.class;
- case "circuitbreakerref":
- case "CircuitBreakerRef": return java.lang.String.class;
+ case "circuitbreaker":
+ case "CircuitBreaker": return java.lang.String.class;
case "delay":
case "Delay": return java.lang.String.class;
case "failureratio":
@@ -107,8 +107,8 @@ public class
FaultToleranceConfigurationDefinitionConfigurer extends org.apache.
case "TimeoutEnabled": return java.lang.String.class;
case "timeoutpoolsize":
case "TimeoutPoolSize": return java.lang.String.class;
- case "timeoutscheduledexecutorserviceref":
- case "TimeoutScheduledExecutorServiceRef": return
java.lang.String.class;
+ case "timeoutscheduledexecutorservice":
+ case "TimeoutScheduledExecutorService": return java.lang.String.class;
default: return null;
}
}
@@ -119,14 +119,14 @@ public class
FaultToleranceConfigurationDefinitionConfigurer extends org.apache.
switch (ignoreCase ? name.toLowerCase() : name) {
case "bulkheadenabled":
case "BulkheadEnabled": return target.getBulkheadEnabled();
- case "bulkheadexecutorserviceref":
- case "BulkheadExecutorServiceRef": return
target.getBulkheadExecutorServiceRef();
+ case "bulkheadexecutorservice":
+ case "BulkheadExecutorService": return
target.getBulkheadExecutorService();
case "bulkheadmaxconcurrentcalls":
case "BulkheadMaxConcurrentCalls": return
target.getBulkheadMaxConcurrentCalls();
case "bulkheadwaitingtaskqueue":
case "BulkheadWaitingTaskQueue": return
target.getBulkheadWaitingTaskQueue();
- case "circuitbreakerref":
- case "CircuitBreakerRef": return target.getCircuitBreakerRef();
+ case "circuitbreaker":
+ case "CircuitBreaker": return target.getCircuitBreaker();
case "delay":
case "Delay": return target.getDelay();
case "failureratio":
@@ -143,8 +143,8 @@ public class
FaultToleranceConfigurationDefinitionConfigurer extends org.apache.
case "TimeoutEnabled": return target.getTimeoutEnabled();
case "timeoutpoolsize":
case "TimeoutPoolSize": return target.getTimeoutPoolSize();
- case "timeoutscheduledexecutorserviceref":
- case "TimeoutScheduledExecutorServiceRef": return
target.getTimeoutScheduledExecutorServiceRef();
+ case "timeoutscheduledexecutorservice":
+ case "TimeoutScheduledExecutorService": return
target.getTimeoutScheduledExecutorService();
default: return null;
}
}
diff --git
a/core/camel-core-model/src/generated/java/org/apache/camel/model/Resilience4jConfigurationDefinitionConfigurer.java
b/core/camel-core-model/src/generated/java/org/apache/camel/model/Resilience4jConfigurationDefinitionConfigurer.java
index e50362c..28ebbfd 100644
---
a/core/camel-core-model/src/generated/java/org/apache/camel/model/Resilience4jConfigurationDefinitionConfigurer.java
+++
b/core/camel-core-model/src/generated/java/org/apache/camel/model/Resilience4jConfigurationDefinitionConfigurer.java
@@ -24,8 +24,8 @@ public class Resilience4jConfigurationDefinitionConfigurer
extends org.apache.ca
map.put("BulkheadEnabled", java.lang.String.class);
map.put("BulkheadMaxConcurrentCalls", java.lang.String.class);
map.put("BulkheadMaxWaitDuration", java.lang.String.class);
- map.put("CircuitBreakerRef", java.lang.String.class);
- map.put("ConfigRef", java.lang.String.class);
+ map.put("CircuitBreaker", java.lang.String.class);
+ map.put("Config", java.lang.String.class);
map.put("FailureRateThreshold", java.lang.String.class);
map.put("Id", java.lang.String.class);
map.put("MinimumNumberOfCalls", java.lang.String.class);
@@ -37,7 +37,7 @@ public class Resilience4jConfigurationDefinitionConfigurer
extends org.apache.ca
map.put("TimeoutCancelRunningFuture", java.lang.String.class);
map.put("TimeoutDuration", java.lang.String.class);
map.put("TimeoutEnabled", java.lang.String.class);
- map.put("TimeoutExecutorServiceRef", java.lang.String.class);
+ map.put("TimeoutExecutorService", java.lang.String.class);
map.put("WaitDurationInOpenState", java.lang.String.class);
map.put("WritableStackTraceEnabled", java.lang.String.class);
ALL_OPTIONS = map;
@@ -55,10 +55,10 @@ public class Resilience4jConfigurationDefinitionConfigurer
extends org.apache.ca
case "BulkheadMaxConcurrentCalls":
target.setBulkheadMaxConcurrentCalls(property(camelContext,
java.lang.String.class, value)); return true;
case "bulkheadmaxwaitduration":
case "BulkheadMaxWaitDuration":
target.setBulkheadMaxWaitDuration(property(camelContext,
java.lang.String.class, value)); return true;
- case "circuitbreakerref":
- case "CircuitBreakerRef":
target.setCircuitBreakerRef(property(camelContext, java.lang.String.class,
value)); return true;
- case "configref":
- case "ConfigRef": target.setConfigRef(property(camelContext,
java.lang.String.class, value)); return true;
+ case "circuitbreaker":
+ case "CircuitBreaker": target.setCircuitBreaker(property(camelContext,
java.lang.String.class, value)); return true;
+ case "config":
+ case "Config": target.setConfig(property(camelContext,
java.lang.String.class, value)); return true;
case "failureratethreshold":
case "FailureRateThreshold":
target.setFailureRateThreshold(property(camelContext, java.lang.String.class,
value)); return true;
case "id":
@@ -81,8 +81,8 @@ public class Resilience4jConfigurationDefinitionConfigurer
extends org.apache.ca
case "TimeoutDuration":
target.setTimeoutDuration(property(camelContext, java.lang.String.class,
value)); return true;
case "timeoutenabled":
case "TimeoutEnabled": target.setTimeoutEnabled(property(camelContext,
java.lang.String.class, value)); return true;
- case "timeoutexecutorserviceref":
- case "TimeoutExecutorServiceRef":
target.setTimeoutExecutorServiceRef(property(camelContext,
java.lang.String.class, value)); return true;
+ case "timeoutexecutorservice":
+ case "TimeoutExecutorService":
target.setTimeoutExecutorService(property(camelContext, java.lang.String.class,
value)); return true;
case "waitdurationinopenstate":
case "WaitDurationInOpenState":
target.setWaitDurationInOpenState(property(camelContext,
java.lang.String.class, value)); return true;
case "writablestacktraceenabled":
@@ -107,10 +107,10 @@ public class
Resilience4jConfigurationDefinitionConfigurer extends org.apache.ca
case "BulkheadMaxConcurrentCalls": return java.lang.String.class;
case "bulkheadmaxwaitduration":
case "BulkheadMaxWaitDuration": return java.lang.String.class;
- case "circuitbreakerref":
- case "CircuitBreakerRef": return java.lang.String.class;
- case "configref":
- case "ConfigRef": return java.lang.String.class;
+ case "circuitbreaker":
+ case "CircuitBreaker": return java.lang.String.class;
+ case "config":
+ case "Config": return java.lang.String.class;
case "failureratethreshold":
case "FailureRateThreshold": return java.lang.String.class;
case "id":
@@ -133,8 +133,8 @@ public class Resilience4jConfigurationDefinitionConfigurer
extends org.apache.ca
case "TimeoutDuration": return java.lang.String.class;
case "timeoutenabled":
case "TimeoutEnabled": return java.lang.String.class;
- case "timeoutexecutorserviceref":
- case "TimeoutExecutorServiceRef": return java.lang.String.class;
+ case "timeoutexecutorservice":
+ case "TimeoutExecutorService": return java.lang.String.class;
case "waitdurationinopenstate":
case "WaitDurationInOpenState": return java.lang.String.class;
case "writablestacktraceenabled":
@@ -155,10 +155,10 @@ public class
Resilience4jConfigurationDefinitionConfigurer extends org.apache.ca
case "BulkheadMaxConcurrentCalls": return
target.getBulkheadMaxConcurrentCalls();
case "bulkheadmaxwaitduration":
case "BulkheadMaxWaitDuration": return
target.getBulkheadMaxWaitDuration();
- case "circuitbreakerref":
- case "CircuitBreakerRef": return target.getCircuitBreakerRef();
- case "configref":
- case "ConfigRef": return target.getConfigRef();
+ case "circuitbreaker":
+ case "CircuitBreaker": return target.getCircuitBreaker();
+ case "config":
+ case "Config": return target.getConfig();
case "failureratethreshold":
case "FailureRateThreshold": return target.getFailureRateThreshold();
case "id":
@@ -181,8 +181,8 @@ public class Resilience4jConfigurationDefinitionConfigurer
extends org.apache.ca
case "TimeoutDuration": return target.getTimeoutDuration();
case "timeoutenabled":
case "TimeoutEnabled": return target.getTimeoutEnabled();
- case "timeoutexecutorserviceref":
- case "TimeoutExecutorServiceRef": return
target.getTimeoutExecutorServiceRef();
+ case "timeoutexecutorservice":
+ case "TimeoutExecutorService": return
target.getTimeoutExecutorService();
case "waitdurationinopenstate":
case "WaitDurationInOpenState": return
target.getWaitDurationInOpenState();
case "writablestacktraceenabled":
diff --git
a/core/camel-core-model/src/generated/resources/org/apache/camel/model/faultToleranceConfiguration.json
b/core/camel-core-model/src/generated/resources/org/apache/camel/model/faultToleranceConfiguration.json
index 65da1b9..b656bc9 100644
---
a/core/camel-core-model/src/generated/resources/org/apache/camel/model/faultToleranceConfiguration.json
+++
b/core/camel-core-model/src/generated/resources/org/apache/camel/model/faultToleranceConfiguration.json
@@ -12,7 +12,7 @@
"output": false
},
"properties": {
- "circuitBreakerRef": { "kind": "attribute", "displayName": "Circuit
Breaker Ref", "label": "circuitbreaker", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Refers to an existing
io.smallrye.faulttolerance.core.circuit.breaker.CircuitBreaker instance to
lookup and use from the registry. When using this, then any other circuit
breaker options are not in use." },
+ "circuitBreaker": { "kind": "attribute", "displayName": "Circuit Breaker",
"label": "circuitbreaker", "required": false, "type": "object", "javaType":
"io.smallrye.faulttolerance.core.circuit.breaker.CircuitBreaker", "deprecated":
false, "autowired": false, "secret": false, "description": "Refers to an
existing io.smallrye.faulttolerance.core.circuit.breaker.CircuitBreaker
instance to lookup and use from the registry. When using this, then any other
circuit breaker options are not in [...]
"delay": { "kind": "attribute", "displayName": "Delay", "label":
"circuitbreaker", "required": false, "type": "duration", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "5000", "description": "Control how long the circuit breaker
stays open. The default is 5 seconds." },
"successThreshold": { "kind": "attribute", "displayName": "Success
Threshold", "label": "circuitbreaker", "required": false, "type": "integer",
"javaType": "java.lang.Integer", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "1", "description": "Controls the number of
trial calls which are allowed when the circuit breaker is half-open" },
"requestVolumeThreshold": { "kind": "attribute", "displayName": "Request
Volume Threshold", "label": "circuitbreaker", "required": false, "type":
"integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "20", "description": "Controls the size
of the rolling window used when the circuit breaker is closed" },
@@ -20,11 +20,11 @@
"timeoutEnabled": { "kind": "attribute", "displayName": "Timeout Enabled",
"label": "timeout", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether timeout is enabled or not on the
circuit breaker. Default is false." },
"timeoutDuration": { "kind": "attribute", "displayName": "Timeout
Duration", "label": "timeout", "required": false, "type": "duration",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "1000", "description": "Configures the thread
execution timeout. Default value is 1 second." },
"timeoutPoolSize": { "kind": "attribute", "displayName": "Timeout Pool
Size", "label": "timeout", "required": false, "type": "integer", "javaType":
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "10", "description": "Configures the pool size of the thread
pool when timeout is enabled. Default value is 10." },
- "timeoutScheduledExecutorServiceRef": { "kind": "attribute",
"displayName": "Timeout Scheduled Executor Service Ref", "label": "timeout",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description":
"References to a custom thread pool to use when timeout is enabled" },
+ "timeoutScheduledExecutorService": { "kind": "attribute", "displayName":
"Timeout Scheduled Executor Service", "label": "timeout", "required": false,
"type": "object", "javaType": "java.util.concurrent.ScheduledExecutorService",
"deprecated": false, "autowired": false, "secret": false, "description":
"References to a custom thread pool to use when timeout is enabled" },
"bulkheadEnabled": { "kind": "attribute", "displayName": "Bulkhead
Enabled", "label": "bulkhead", "required": false, "type": "boolean",
"javaType": "java.lang.Boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "description": "Whether bulkhead is
enabled or not on the circuit breaker. Default is false." },
"bulkheadMaxConcurrentCalls": { "kind": "attribute", "displayName":
"Bulkhead Max Concurrent Calls", "label": "bulkhead", "required": false,
"type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "10", "description":
"Configures the max amount of concurrent calls the bulkhead will support." },
"bulkheadWaitingTaskQueue": { "kind": "attribute", "displayName":
"Bulkhead Waiting Task Queue", "label": "bulkhead", "required": false, "type":
"integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "10", "description": "Configures the
task queue size for holding waiting tasks to be processed by the bulkhead." },
- "bulkheadExecutorServiceRef": { "kind": "attribute", "displayName":
"Bulkhead Executor Service Ref", "label": "bulkhead", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "References to a custom
thread pool to use when bulkhead is enabled." },
+ "bulkheadExecutorService": { "kind": "attribute", "displayName": "Bulkhead
Executor Service", "label": "bulkhead", "required": false, "type": "object",
"javaType": "java.util.concurrent.ExecutorService", "deprecated": false,
"autowired": false, "secret": false, "description": "References to a custom
thread pool to use when bulkhead is enabled." },
"id": { "kind": "attribute", "displayName": "Id", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "The id of this node" }
}
}
diff --git
a/core/camel-core-model/src/generated/resources/org/apache/camel/model/resilience4jConfiguration.json
b/core/camel-core-model/src/generated/resources/org/apache/camel/model/resilience4jConfiguration.json
index 8f3e0bd..5dd9d98 100644
---
a/core/camel-core-model/src/generated/resources/org/apache/camel/model/resilience4jConfiguration.json
+++
b/core/camel-core-model/src/generated/resources/org/apache/camel/model/resilience4jConfiguration.json
@@ -12,8 +12,8 @@
"output": false
},
"properties": {
- "circuitBreakerRef": { "kind": "attribute", "displayName": "Circuit
Breaker Ref", "label": "circuitbreaker", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreaker instance to lookup and use
from the registry. When using this, then any other circuit breaker options are
not in use." },
- "configRef": { "kind": "attribute", "displayName": "Config Ref", "label":
"circuitbreaker", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from the registry." },
+ "circuitBreaker": { "kind": "attribute", "displayName": "Circuit Breaker",
"label": "circuitbreaker", "required": false, "type": "object", "javaType":
"io.github.resilience4j.circuitbreaker.CircuitBreaker", "deprecated": false,
"autowired": false, "secret": false, "description": "Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreaker instance to lookup and use
from the registry. When using this, then any other circuit breaker options are
not in use." },
+ "config": { "kind": "attribute", "displayName": "Config", "label":
"circuitbreaker", "required": false, "type": "object", "javaType":
"io.github.resilience4j.circuitbreaker.CircuitBreakerConfig", "deprecated":
false, "autowired": false, "secret": false, "description": "Refers to an
existing io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to
lookup and use from the registry." },
"failureRateThreshold": { "kind": "attribute", "displayName": "Failure
Rate Threshold", "label": "circuitbreaker", "required": false, "type":
"number", "javaType": "java.lang.Float", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "50", "description": "Configures the
failure rate threshold in percentage. If the failure rate is equal or greater
than the threshold the CircuitBreaker transitions to open and starts
short-circuiting calls. The threshold must be g [...]
"permittedNumberOfCallsInHalfOpenState": { "kind": "attribute",
"displayName": "Permitted Number Of Calls In Half Open State", "label":
"circuitbreaker", "required": false, "type": "integer", "javaType":
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "10", "description": "Configures the number of permitted calls
when the CircuitBreaker is half open. The size must be greater than 0. Default
size is 10." },
"slidingWindowSize": { "kind": "attribute", "displayName": "Sliding Window
Size", "label": "circuitbreaker", "required": false, "type": "integer",
"javaType": "java.lang.Integer", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "100", "description": "Configures the size of
the sliding window which is used to record the outcome of calls when the
CircuitBreaker is closed. slidingWindowSize configures the size of the sliding
window. Sliding window can either be [...]
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/FaultToleranceConfigurationCommon.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/FaultToleranceConfigurationCommon.java
index 922fbe4..d1c9e89 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/model/FaultToleranceConfigurationCommon.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/FaultToleranceConfigurationCommon.java
@@ -26,8 +26,8 @@ import org.apache.camel.spi.Metadata;
public class FaultToleranceConfigurationCommon extends IdentifiedType {
@XmlAttribute
- @Metadata(label = "circuitbreaker")
- private String circuitBreakerRef;
+ @Metadata(label = "circuitbreaker", javaType =
"io.smallrye.faulttolerance.core.circuit.breaker.CircuitBreaker")
+ private String circuitBreaker;
@XmlAttribute
@Metadata(label = "circuitbreaker", defaultValue = "5000", javaType =
"java.time.Duration")
private String delay;
@@ -50,8 +50,8 @@ public class FaultToleranceConfigurationCommon extends
IdentifiedType {
@Metadata(label = "timeout", defaultValue = "10", javaType =
"java.lang.Integer")
private String timeoutPoolSize;
@XmlAttribute
- @Metadata(label = "timeout")
- private String timeoutScheduledExecutorServiceRef;
+ @Metadata(label = "timeout", javaType =
"java.util.concurrent.ScheduledExecutorService")
+ private String timeoutScheduledExecutorService;
@XmlAttribute
@Metadata(label = "bulkhead", defaultValue = "false", javaType =
"java.lang.Boolean")
private String bulkheadEnabled;
@@ -62,22 +62,22 @@ public class FaultToleranceConfigurationCommon extends
IdentifiedType {
@Metadata(label = "bulkhead", defaultValue = "10", javaType =
"java.lang.Integer")
private String bulkheadWaitingTaskQueue;
@XmlAttribute
- @Metadata(label = "bulkhead")
- private String bulkheadExecutorServiceRef;
+ @Metadata(label = "bulkhead", javaType =
"java.util.concurrent.ExecutorService")
+ private String bulkheadExecutorService;
// Getter/Setter
//
-------------------------------------------------------------------------
- public String getCircuitBreakerRef() {
- return circuitBreakerRef;
+ public String getCircuitBreaker() {
+ return circuitBreaker;
}
/**
* Refers to an existing
io.smallrye.faulttolerance.core.circuit.breaker.CircuitBreaker instance to
lookup and use
* from the registry. When using this, then any other circuit breaker
options are not in use.
*/
- public void setCircuitBreakerRef(String circuitBreakerRef) {
- this.circuitBreakerRef = circuitBreakerRef;
+ public void setCircuitBreaker(String circuitBreaker) {
+ this.circuitBreaker = circuitBreaker;
}
public String getDelay() {
@@ -160,15 +160,15 @@ public class FaultToleranceConfigurationCommon extends
IdentifiedType {
this.timeoutPoolSize = timeoutPoolSize;
}
- public String getTimeoutScheduledExecutorServiceRef() {
- return timeoutScheduledExecutorServiceRef;
+ public String getTimeoutScheduledExecutorService() {
+ return timeoutScheduledExecutorService;
}
/**
* References to a custom thread pool to use when timeout is enabled
*/
- public void setTimeoutScheduledExecutorServiceRef(String
timeoutScheduledExecutorServiceRef) {
- this.timeoutScheduledExecutorServiceRef =
timeoutScheduledExecutorServiceRef;
+ public void setTimeoutScheduledExecutorService(String
timeoutScheduledExecutorService) {
+ this.timeoutScheduledExecutorService = timeoutScheduledExecutorService;
}
public String getBulkheadEnabled() {
@@ -204,14 +204,14 @@ public class FaultToleranceConfigurationCommon extends
IdentifiedType {
this.bulkheadWaitingTaskQueue = bulkheadWaitingTaskQueue;
}
- public String getBulkheadExecutorServiceRef() {
- return bulkheadExecutorServiceRef;
+ public String getBulkheadExecutorService() {
+ return bulkheadExecutorService;
}
/**
* References to a custom thread pool to use when bulkhead is enabled.
*/
- public void setBulkheadExecutorServiceRef(String
bulkheadExecutorServiceRef) {
- this.bulkheadExecutorServiceRef = bulkheadExecutorServiceRef;
+ public void setBulkheadExecutorService(String bulkheadExecutorService) {
+ this.bulkheadExecutorService = bulkheadExecutorService;
}
}
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/FaultToleranceConfigurationDefinition.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/FaultToleranceConfigurationDefinition.java
index 66801ee..fae3917 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/model/FaultToleranceConfigurationDefinition.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/FaultToleranceConfigurationDefinition.java
@@ -50,8 +50,8 @@ public class FaultToleranceConfigurationDefinition extends
FaultToleranceConfigu
* Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreaker instance to lookup and use
from the
* registry. When using this, then any other circuit breaker options are
not in use.
*/
- public FaultToleranceConfigurationDefinition circuitBreakerRef(String
circuitBreakerRef) {
- setCircuitBreakerRef(circuitBreakerRef);
+ public FaultToleranceConfigurationDefinition circuitBreaker(String
circuitBreaker) {
+ setCircuitBreaker(circuitBreaker);
return this;
}
@@ -133,8 +133,8 @@ public class FaultToleranceConfigurationDefinition extends
FaultToleranceConfigu
/**
* References to a custom thread pool to use when timeout is enabled
*/
- public FaultToleranceConfigurationDefinition
timeoutScheduledExecutorServiceRef(String executorServiceRef) {
- setTimeoutScheduledExecutorServiceRef(executorServiceRef);
+ public FaultToleranceConfigurationDefinition
timeoutScheduledExecutorService(String executorService) {
+ setTimeoutScheduledExecutorService(executorService);
return this;
}
@@ -165,8 +165,8 @@ public class FaultToleranceConfigurationDefinition extends
FaultToleranceConfigu
/**
* References to a custom thread pool to use when bulkhead is enabled
*/
- public FaultToleranceConfigurationDefinition
bulkheadExecutorServiceRef(String executorServiceRef) {
- setBulkheadExecutorServiceRef(executorServiceRef);
+ public FaultToleranceConfigurationDefinition
bulkheadExecutorService(String executorService) {
+ setBulkheadExecutorService(executorService);
return this;
}
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationCommon.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationCommon.java
index d3eed08..acdccfc 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationCommon.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationCommon.java
@@ -28,11 +28,11 @@ import org.apache.camel.spi.Metadata;
public class Resilience4jConfigurationCommon extends IdentifiedType {
@XmlAttribute
- @Metadata(label = "circuitbreaker")
- private String circuitBreakerRef;
+ @Metadata(label = "circuitbreaker", javaType =
"io.github.resilience4j.circuitbreaker.CircuitBreaker")
+ private String circuitBreaker;
@XmlAttribute
- @Metadata(label = "circuitbreaker")
- private String configRef;
+ @Metadata(label = "circuitbreaker", javaType =
"io.github.resilience4j.circuitbreaker.CircuitBreakerConfig")
+ private String config;
@XmlAttribute
@Metadata(label = "circuitbreaker", defaultValue = "50", javaType =
"java.lang.Float")
private String failureRateThreshold;
@@ -71,8 +71,8 @@ public class Resilience4jConfigurationCommon extends
IdentifiedType {
private String bulkheadMaxWaitDuration;
@Metadata(label = "timeout", defaultValue = "false", javaType =
"java.lang.Boolean")
private String timeoutEnabled;
- @Metadata(label = "timeout")
- private String timeoutExecutorServiceRef;
+ @Metadata(label = "timeout", javaType =
"java.util.concurrent.ExecutorService")
+ private String timeoutExecutorService;
@Metadata(label = "timeout", defaultValue = "1000", javaType =
"java.lang.Integer")
private String timeoutDuration;
@Metadata(label = "timeout", defaultValue = "true", javaType =
"java.lang.Boolean")
@@ -81,28 +81,28 @@ public class Resilience4jConfigurationCommon extends
IdentifiedType {
// Getter/Setter
//
-------------------------------------------------------------------------
- public String getCircuitBreakerRef() {
- return circuitBreakerRef;
+ public String getCircuitBreaker() {
+ return circuitBreaker;
}
/**
* Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreaker instance to lookup and use
from the
* registry. When using this, then any other circuit breaker options are
not in use.
*/
- public void setCircuitBreakerRef(String circuitBreakerRef) {
- this.circuitBreakerRef = circuitBreakerRef;
+ public void setCircuitBreaker(String circuitBreaker) {
+ this.circuitBreaker = circuitBreaker;
}
- public String getConfigRef() {
- return configRef;
+ public String getConfig() {
+ return config;
}
/**
* Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from
* the registry.
*/
- public void setConfigRef(String configRef) {
- this.configRef = configRef;
+ public void setConfig(String config) {
+ this.config = config;
}
public String getFailureRateThreshold() {
@@ -303,16 +303,16 @@ public class Resilience4jConfigurationCommon extends
IdentifiedType {
this.timeoutEnabled = timeoutEnabled;
}
- public String getTimeoutExecutorServiceRef() {
- return timeoutExecutorServiceRef;
+ public String getTimeoutExecutorService() {
+ return timeoutExecutorService;
}
/**
* References to a custom thread pool to use when timeout is enabled (uses
{@link ForkJoinPool#commonPool()} by
* default)
*/
- public void setTimeoutExecutorServiceRef(String timeoutExecutorServiceRef)
{
- this.timeoutExecutorServiceRef = timeoutExecutorServiceRef;
+ public void setTimeoutExecutorService(String timeoutExecutorService) {
+ this.timeoutExecutorService = timeoutExecutorService;
}
public String getTimeoutDuration() {
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationDefinition.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationDefinition.java
index 1625976..e76a92e 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationDefinition.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/Resilience4jConfigurationDefinition.java
@@ -52,8 +52,8 @@ public class Resilience4jConfigurationDefinition extends
Resilience4jConfigurati
* Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreaker instance to lookup and use
from the
* registry. When using this, then any other circuit breaker options are
not in use.
*/
- public Resilience4jConfigurationDefinition circuitBreakerRef(String
circuitBreakerRef) {
- setCircuitBreakerRef(circuitBreakerRef);
+ public Resilience4jConfigurationDefinition circuitBreaker(String
circuitBreaker) {
+ setCircuitBreaker(circuitBreaker);
return this;
}
@@ -61,8 +61,8 @@ public class Resilience4jConfigurationDefinition extends
Resilience4jConfigurati
* Refers to an existing
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig instance to lookup
and use from
* the registry.
*/
- public Resilience4jConfigurationDefinition configRef(String ref) {
- setConfigRef(ref);
+ public Resilience4jConfigurationDefinition config(String ref) {
+ setConfig(ref);
return this;
}
@@ -228,8 +228,8 @@ public class Resilience4jConfigurationDefinition extends
Resilience4jConfigurati
* References to a custom thread pool to use when timeout is enabled (uses
{@link ForkJoinPool#commonPool()} by
* default)
*/
- public Resilience4jConfigurationDefinition
timeoutExecutorServiceRef(String executorServiceRef) {
- setTimeoutExecutorServiceRef(executorServiceRef);
+ public Resilience4jConfigurationDefinition timeoutExecutorService(String
executorService) {
+ setTimeoutExecutorService(executorService);
return this;
}
diff --git
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
index 53d778e..0c4da44 100644
---
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
+++
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
@@ -385,10 +385,10 @@ public class ModelParser extends BaseParser {
return (def, key, val) -> {
switch (key) {
case "bulkheadEnabled": def.setBulkheadEnabled(val); break;
- case "bulkheadExecutorServiceRef":
def.setBulkheadExecutorServiceRef(val); break;
+ case "bulkheadExecutorService":
def.setBulkheadExecutorService(val); break;
case "bulkheadMaxConcurrentCalls":
def.setBulkheadMaxConcurrentCalls(val); break;
case "bulkheadWaitingTaskQueue":
def.setBulkheadWaitingTaskQueue(val); break;
- case "circuitBreakerRef": def.setCircuitBreakerRef(val); break;
+ case "circuitBreaker": def.setCircuitBreaker(val); break;
case "delay": def.setDelay(val); break;
case "failureRatio": def.setFailureRatio(val); break;
case "requestVolumeThreshold":
def.setRequestVolumeThreshold(val); break;
@@ -396,7 +396,7 @@ public class ModelParser extends BaseParser {
case "timeoutDuration": def.setTimeoutDuration(val); break;
case "timeoutEnabled": def.setTimeoutEnabled(val); break;
case "timeoutPoolSize": def.setTimeoutPoolSize(val); break;
- case "timeoutScheduledExecutorServiceRef":
def.setTimeoutScheduledExecutorServiceRef(val); break;
+ case "timeoutScheduledExecutorService":
def.setTimeoutScheduledExecutorService(val); break;
default: return identifiedTypeAttributeHandler().accept(def,
key, val);
}
return true;
@@ -907,8 +907,8 @@ public class ModelParser extends BaseParser {
return (def, key, val) -> {
switch (key) {
case "automaticTransitionFromOpenToHalfOpenEnabled":
def.setAutomaticTransitionFromOpenToHalfOpenEnabled(val); break;
- case "circuitBreakerRef": def.setCircuitBreakerRef(val); break;
- case "configRef": def.setConfigRef(val); break;
+ case "circuitBreaker": def.setCircuitBreaker(val); break;
+ case "config": def.setConfig(val); break;
case "failureRateThreshold": def.setFailureRateThreshold(val);
break;
case "minimumNumberOfCalls": def.setMinimumNumberOfCalls(val);
break;
case "permittedNumberOfCallsInHalfOpenState":
def.setPermittedNumberOfCallsInHalfOpenState(val); break;
@@ -932,7 +932,7 @@ public class ModelParser extends BaseParser {
case "timeoutCancelRunningFuture":
def.setTimeoutCancelRunningFuture(doParseText()); break;
case "timeoutDuration": def.setTimeoutDuration(doParseText());
break;
case "timeoutEnabled": def.setTimeoutEnabled(doParseText());
break;
- case "timeoutExecutorServiceRef":
def.setTimeoutExecutorServiceRef(doParseText()); break;
+ case "timeoutExecutorService":
def.setTimeoutExecutorService(doParseText()); break;
default: return false;
}
return true;
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_16.adoc
b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_16.adoc
index ab7b184..d5833ef 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_16.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_16.adoc
@@ -150,6 +150,13 @@ Renamed `executorServiceRef` to `executorService`.
Renamed `timeoutCheckerExecutorServiceRef` to `timeoutCheckerExecutorService`.
Removed some deprecated methods, and some unnecessary methods in Java DSL.
+=== Circuit Breaker EIP
+
+Renamed `circuitBreakerRef` to `circuitBreaker`.
+Renamed `configRef` to `config`.
+Renamed `bulkheadExecutorServiceRef` to `bulkheadExecutorService`.
+Renamed `timeoutScheduledExecutorServiceRef` to
`timeoutScheduledExecutorService`.
+
=== Delay EIP
Renamed `executorServiceRef` to `executorService`.
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
index 6d0dff6..d30e103 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
@@ -4765,10 +4765,10 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
},
properties = {
@YamlProperty(name = "bulkhead-enabled", type = "boolean"),
- @YamlProperty(name = "bulkhead-executor-service-ref", type
= "string"),
+ @YamlProperty(name = "bulkhead-executor-service", type =
"string"),
@YamlProperty(name = "bulkhead-max-concurrent-calls", type
= "number"),
@YamlProperty(name = "bulkhead-waiting-task-queue", type =
"number"),
- @YamlProperty(name = "circuit-breaker-ref", type =
"string"),
+ @YamlProperty(name = "circuit-breaker", type = "string"),
@YamlProperty(name = "delay", type = "string"),
@YamlProperty(name = "failure-ratio", type = "number"),
@YamlProperty(name = "id", type = "string"),
@@ -4777,7 +4777,7 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
@YamlProperty(name = "timeout-duration", type = "string"),
@YamlProperty(name = "timeout-enabled", type = "boolean"),
@YamlProperty(name = "timeout-pool-size", type = "number"),
- @YamlProperty(name =
"timeout-scheduled-executor-service-ref", type = "string")
+ @YamlProperty(name = "timeout-scheduled-executor-service",
type = "string")
}
)
public static class FaultToleranceConfigurationDefinitionDeserializer
extends YamlDeserializerBase<FaultToleranceConfigurationDefinition> {
@@ -4799,9 +4799,9 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
target.setBulkheadEnabled(val);
break;
}
- case "bulkhead-executor-service-ref": {
+ case "bulkhead-executor-service": {
String val = asText(node);
- target.setBulkheadExecutorServiceRef(val);
+ target.setBulkheadExecutorService(val);
break;
}
case "bulkhead-max-concurrent-calls": {
@@ -4814,9 +4814,9 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
target.setBulkheadWaitingTaskQueue(val);
break;
}
- case "circuit-breaker-ref": {
+ case "circuit-breaker": {
String val = asText(node);
- target.setCircuitBreakerRef(val);
+ target.setCircuitBreaker(val);
break;
}
case "delay": {
@@ -4859,9 +4859,9 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
target.setTimeoutPoolSize(val);
break;
}
- case "timeout-scheduled-executor-service-ref": {
+ case "timeout-scheduled-executor-service": {
String val = asText(node);
- target.setTimeoutScheduledExecutorServiceRef(val);
+ target.setTimeoutScheduledExecutorService(val);
break;
}
default: {
@@ -11199,8 +11199,8 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
},
properties = {
@YamlProperty(name =
"automatic-transition-from-open-to-half-open-enabled", type = "boolean"),
- @YamlProperty(name = "circuit-breaker-ref", type =
"string"),
- @YamlProperty(name = "config-ref", type = "string"),
+ @YamlProperty(name = "circuit-breaker", type = "string"),
+ @YamlProperty(name = "config", type = "string"),
@YamlProperty(name = "failure-rate-threshold", type =
"number"),
@YamlProperty(name = "id", type = "string"),
@YamlProperty(name = "minimum-number-of-calls", type =
"number"),
@@ -11232,14 +11232,14 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
target.setAutomaticTransitionFromOpenToHalfOpenEnabled(val);
break;
}
- case "circuit-breaker-ref": {
+ case "circuit-breaker": {
String val = asText(node);
- target.setCircuitBreakerRef(val);
+ target.setCircuitBreaker(val);
break;
}
- case "config-ref": {
+ case "config": {
String val = asText(node);
- target.setConfigRef(val);
+ target.setConfig(val);
break;
}
case "failure-rate-threshold": {
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camel-yaml-dsl.json
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camel-yaml-dsl.json
index 788efba..6c16f3e 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camel-yaml-dsl.json
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camel-yaml-dsl.json
@@ -954,7 +954,7 @@
"bulkhead-enabled" : {
"type" : "boolean"
},
- "bulkhead-executor-service-ref" : {
+ "bulkhead-executor-service" : {
"type" : "string"
},
"bulkhead-max-concurrent-calls" : {
@@ -963,7 +963,7 @@
"bulkhead-waiting-task-queue" : {
"type" : "number"
},
- "circuit-breaker-ref" : {
+ "circuit-breaker" : {
"type" : "string"
},
"delay" : {
@@ -990,7 +990,7 @@
"timeout-pool-size" : {
"type" : "number"
},
- "timeout-scheduled-executor-service-ref" : {
+ "timeout-scheduled-executor-service" : {
"type" : "string"
}
}
@@ -2326,10 +2326,10 @@
"automatic-transition-from-open-to-half-open-enabled" : {
"type" : "boolean"
},
- "circuit-breaker-ref" : {
+ "circuit-breaker" : {
"type" : "string"
},
- "config-ref" : {
+ "config" : {
"type" : "string"
},
"failure-rate-threshold" : {
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camelYamlDsl.json
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camelYamlDsl.json
index aced899..612568f 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camelYamlDsl.json
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camelYamlDsl.json
@@ -855,7 +855,7 @@
"bulkheadEnabled" : {
"type" : "boolean"
},
- "bulkheadExecutorServiceRef" : {
+ "bulkheadExecutorService" : {
"type" : "string"
},
"bulkheadMaxConcurrentCalls" : {
@@ -864,7 +864,7 @@
"bulkheadWaitingTaskQueue" : {
"type" : "number"
},
- "circuitBreakerRef" : {
+ "circuitBreaker" : {
"type" : "string"
},
"delay" : {
@@ -891,7 +891,7 @@
"timeoutPoolSize" : {
"type" : "number"
},
- "timeoutScheduledExecutorServiceRef" : {
+ "timeoutScheduledExecutorService" : {
"type" : "string"
}
}
@@ -2227,10 +2227,10 @@
"automaticTransitionFromOpenToHalfOpenEnabled" : {
"type" : "boolean"
},
- "circuitBreakerRef" : {
+ "circuitBreaker" : {
"type" : "string"
},
- "configRef" : {
+ "config" : {
"type" : "string"
},
"failureRateThreshold" : {