You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/08/11 11:23:07 UTC
[camel] 02/03: CAMEL-15520: removed the deprecated option readTimeoutMillis from camel-consul
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 4c5e57c9d6e389475cc3aa4a17d957f327541828
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Aug 11 11:06:50 2022 +0200
CAMEL-15520: removed the deprecated option readTimeoutMillis from camel-consul
---
.../apache/camel/catalog/components/consul.json | 2 -
.../consul/ConsulComponentConfigurer.java | 6 --
.../component/consul/ConsulEndpointConfigurer.java | 6 --
.../component/consul/ConsulEndpointUriFactory.java | 3 +-
.../ConsulServiceDiscoveryFactoryConfigurer.java | 12 +--
.../org/apache/camel/component/consul/consul.json | 2 -
.../consul/ConsulClientConfiguration.java | 20 +---
.../cloud/ConsulServiceDiscoveryFactory.java | 8 +-
.../consul/cloud/ConsulServiceRegistry.java | 8 +-
.../consul/cluster/ConsulClusterService.java | 8 +-
.../ROOT/pages/camel-3x-upgrade-guide-3_19.adoc | 3 +
.../dsl/ConsulComponentBuilderFactory.java | 18 ----
.../endpoint/dsl/ConsulEndpointBuilderFactory.java | 103 ---------------------
13 files changed, 23 insertions(+), 176 deletions(-)
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/consul.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/consul.json
index b46bd080f2e..c8174d824c7 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/consul.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/consul.json
@@ -27,7 +27,6 @@
"key": { "kind": "property", "displayName": "Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "The default key. Can be overridden by CamelConsulKey" },
"pingInstance": { "kind": "property", "displayName": "Ping Instance", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Configure if the AgentClient should attempt a ping before returning the Consul instance" },
"readTimeout": { "kind": "property", "displayName": "Read Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Read timeout for OkHttpClient" },
- "readTimeoutMillis": { "kind": "property", "displayName": "Read Timeout Millis", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": true, "deprecationNote": "Use readTimeout instead", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Read timeout for OkHttpClient. Deprecation note: Use readTimeout instead" },
"tags": { "kind": "property", "displayName": "Tags", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Set tags. You can separate multiple tags by comma." },
"url": { "kind": "property", "displayName": "Url", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "The Consul agent URL" },
"writeTimeout": { "kind": "property", "displayName": "Write Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Write timeout for OkHttpClient" },
@@ -91,7 +90,6 @@
"key": { "kind": "parameter", "displayName": "Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "The default key. Can be overridden by CamelConsulKey" },
"pingInstance": { "kind": "parameter", "displayName": "Ping Instance", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Configure if the AgentClient should attempt a ping before returning the Consul instance" },
"readTimeout": { "kind": "parameter", "displayName": "Read Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Read timeout for OkHttpClient" },
- "readTimeoutMillis": { "kind": "parameter", "displayName": "Read Timeout Millis", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": true, "deprecationNote": "Use readTimeout instead", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Read timeout for OkHttpClient. Deprecation note: Use readTimeout instead" },
"tags": { "kind": "parameter", "displayName": "Tags", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Set tags. You can separate multiple tags by comma." },
"url": { "kind": "parameter", "displayName": "Url", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "The Consul agent URL" },
"writeTimeout": { "kind": "parameter", "displayName": "Write Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Write timeout for OkHttpClient" },
diff --git a/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulComponentConfigurer.java b/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulComponentConfigurer.java
index 5b3327e8352..c7839a542d0 100644
--- a/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulComponentConfigurer.java
+++ b/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulComponentConfigurer.java
@@ -59,8 +59,6 @@ public class ConsulComponentConfigurer extends PropertyConfigurerSupport impleme
case "pingInstance": getOrCreateConfiguration(target).setPingInstance(property(camelContext, boolean.class, value)); return true;
case "readtimeout":
case "readTimeout": getOrCreateConfiguration(target).setReadTimeout(property(camelContext, java.time.Duration.class, value)); return true;
- case "readtimeoutmillis":
- case "readTimeoutMillis": getOrCreateConfiguration(target).setReadTimeoutMillis(property(camelContext, java.lang.Long.class, value)); return true;
case "recursive": getOrCreateConfiguration(target).setRecursive(property(camelContext, boolean.class, value)); return true;
case "sslcontextparameters":
case "sslContextParameters": getOrCreateConfiguration(target).setSslContextParameters(property(camelContext, org.apache.camel.support.jsse.SSLContextParameters.class, value)); return true;
@@ -114,8 +112,6 @@ public class ConsulComponentConfigurer extends PropertyConfigurerSupport impleme
case "pingInstance": return boolean.class;
case "readtimeout":
case "readTimeout": return java.time.Duration.class;
- case "readtimeoutmillis":
- case "readTimeoutMillis": return java.lang.Long.class;
case "recursive": return boolean.class;
case "sslcontextparameters":
case "sslContextParameters": return org.apache.camel.support.jsse.SSLContextParameters.class;
@@ -170,8 +166,6 @@ public class ConsulComponentConfigurer extends PropertyConfigurerSupport impleme
case "pingInstance": return getOrCreateConfiguration(target).isPingInstance();
case "readtimeout":
case "readTimeout": return getOrCreateConfiguration(target).getReadTimeout();
- case "readtimeoutmillis":
- case "readTimeoutMillis": return getOrCreateConfiguration(target).getReadTimeoutMillis();
case "recursive": return getOrCreateConfiguration(target).isRecursive();
case "sslcontextparameters":
case "sslContextParameters": return getOrCreateConfiguration(target).getSslContextParameters();
diff --git a/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulEndpointConfigurer.java b/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulEndpointConfigurer.java
index b22a768c04b..678568a4732 100644
--- a/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulEndpointConfigurer.java
+++ b/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulEndpointConfigurer.java
@@ -53,8 +53,6 @@ public class ConsulEndpointConfigurer extends PropertyConfigurerSupport implemen
case "pingInstance": target.getConfiguration().setPingInstance(property(camelContext, boolean.class, value)); return true;
case "readtimeout":
case "readTimeout": target.getConfiguration().setReadTimeout(property(camelContext, java.time.Duration.class, value)); return true;
- case "readtimeoutmillis":
- case "readTimeoutMillis": target.getConfiguration().setReadTimeoutMillis(property(camelContext, java.lang.Long.class, value)); return true;
case "recursive": target.getConfiguration().setRecursive(property(camelContext, boolean.class, value)); return true;
case "sslcontextparameters":
case "sslContextParameters": target.getConfiguration().setSslContextParameters(property(camelContext, org.apache.camel.support.jsse.SSLContextParameters.class, value)); return true;
@@ -107,8 +105,6 @@ public class ConsulEndpointConfigurer extends PropertyConfigurerSupport implemen
case "pingInstance": return boolean.class;
case "readtimeout":
case "readTimeout": return java.time.Duration.class;
- case "readtimeoutmillis":
- case "readTimeoutMillis": return java.lang.Long.class;
case "recursive": return boolean.class;
case "sslcontextparameters":
case "sslContextParameters": return org.apache.camel.support.jsse.SSLContextParameters.class;
@@ -162,8 +158,6 @@ public class ConsulEndpointConfigurer extends PropertyConfigurerSupport implemen
case "pingInstance": return target.getConfiguration().isPingInstance();
case "readtimeout":
case "readTimeout": return target.getConfiguration().getReadTimeout();
- case "readtimeoutmillis":
- case "readTimeoutMillis": return target.getConfiguration().getReadTimeoutMillis();
case "recursive": return target.getConfiguration().isRecursive();
case "sslcontextparameters":
case "sslContextParameters": return target.getConfiguration().getSslContextParameters();
diff --git a/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulEndpointUriFactory.java b/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulEndpointUriFactory.java
index d42d077adec..b91bf4a2d4e 100644
--- a/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulEndpointUriFactory.java
+++ b/components/camel-consul/src/generated/java/org/apache/camel/component/consul/ConsulEndpointUriFactory.java
@@ -21,7 +21,7 @@ public class ConsulEndpointUriFactory extends org.apache.camel.support.component
private static final Set<String> SECRET_PROPERTY_NAMES;
private static final Set<String> MULTI_VALUE_PREFIXES;
static {
- Set<String> props = new HashSet<>(28);
+ Set<String> props = new HashSet<>(27);
props.add("aclToken");
props.add("action");
props.add("apiEndpoint");
@@ -41,7 +41,6 @@ public class ConsulEndpointUriFactory extends org.apache.camel.support.component
props.add("password");
props.add("pingInstance");
props.add("readTimeout");
- props.add("readTimeoutMillis");
props.add("recursive");
props.add("sslContextParameters");
props.add("tags");
diff --git a/components/camel-consul/src/generated/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryFactoryConfigurer.java b/components/camel-consul/src/generated/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryFactoryConfigurer.java
index 517cd9a1b8e..957912e24d4 100644
--- a/components/camel-consul/src/generated/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryFactoryConfigurer.java
+++ b/components/camel-consul/src/generated/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryFactoryConfigurer.java
@@ -31,8 +31,8 @@ public class ConsulServiceDiscoveryFactoryConfigurer extends org.apache.camel.su
case "Datacenter": target.setDatacenter(property(camelContext, java.lang.String.class, value)); return true;
case "password":
case "Password": target.setPassword(property(camelContext, java.lang.String.class, value)); return true;
- case "readtimeoutmillis":
- case "ReadTimeoutMillis": target.setReadTimeoutMillis(property(camelContext, java.lang.Long.class, value)); return true;
+ case "readtimeout":
+ case "ReadTimeout": target.setReadTimeout(property(camelContext, java.time.Duration.class, value)); return true;
case "sslcontextparameters":
case "SslContextParameters": target.setSslContextParameters(property(camelContext, org.apache.camel.support.jsse.SSLContextParameters.class, value)); return true;
case "url":
@@ -58,8 +58,8 @@ public class ConsulServiceDiscoveryFactoryConfigurer extends org.apache.camel.su
case "Datacenter": return java.lang.String.class;
case "password":
case "Password": return java.lang.String.class;
- case "readtimeoutmillis":
- case "ReadTimeoutMillis": return java.lang.Long.class;
+ case "readtimeout":
+ case "ReadTimeout": return java.time.Duration.class;
case "sslcontextparameters":
case "SslContextParameters": return org.apache.camel.support.jsse.SSLContextParameters.class;
case "url":
@@ -86,8 +86,8 @@ public class ConsulServiceDiscoveryFactoryConfigurer extends org.apache.camel.su
case "Datacenter": return target.getDatacenter();
case "password":
case "Password": return target.getPassword();
- case "readtimeoutmillis":
- case "ReadTimeoutMillis": return target.getReadTimeoutMillis();
+ case "readtimeout":
+ case "ReadTimeout": return target.getReadTimeout();
case "sslcontextparameters":
case "SslContextParameters": return target.getSslContextParameters();
case "url":
diff --git a/components/camel-consul/src/generated/resources/org/apache/camel/component/consul/consul.json b/components/camel-consul/src/generated/resources/org/apache/camel/component/consul/consul.json
index b46bd080f2e..c8174d824c7 100644
--- a/components/camel-consul/src/generated/resources/org/apache/camel/component/consul/consul.json
+++ b/components/camel-consul/src/generated/resources/org/apache/camel/component/consul/consul.json
@@ -27,7 +27,6 @@
"key": { "kind": "property", "displayName": "Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "The default key. Can be overridden by CamelConsulKey" },
"pingInstance": { "kind": "property", "displayName": "Ping Instance", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Configure if the AgentClient should attempt a ping before returning the Consul instance" },
"readTimeout": { "kind": "property", "displayName": "Read Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Read timeout for OkHttpClient" },
- "readTimeoutMillis": { "kind": "property", "displayName": "Read Timeout Millis", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": true, "deprecationNote": "Use readTimeout instead", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Read timeout for OkHttpClient. Deprecation note: Use readTimeout instead" },
"tags": { "kind": "property", "displayName": "Tags", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Set tags. You can separate multiple tags by comma." },
"url": { "kind": "property", "displayName": "Url", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "The Consul agent URL" },
"writeTimeout": { "kind": "property", "displayName": "Write Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Write timeout for OkHttpClient" },
@@ -91,7 +90,6 @@
"key": { "kind": "parameter", "displayName": "Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "The default key. Can be overridden by CamelConsulKey" },
"pingInstance": { "kind": "parameter", "displayName": "Ping Instance", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Configure if the AgentClient should attempt a ping before returning the Consul instance" },
"readTimeout": { "kind": "parameter", "displayName": "Read Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Read timeout for OkHttpClient" },
- "readTimeoutMillis": { "kind": "parameter", "displayName": "Read Timeout Millis", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Long", "deprecated": true, "deprecationNote": "Use readTimeout instead", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Read timeout for OkHttpClient. Deprecation note: Use readTimeout instead" },
"tags": { "kind": "parameter", "displayName": "Tags", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Set tags. You can separate multiple tags by comma." },
"url": { "kind": "parameter", "displayName": "Url", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "The Consul agent URL" },
"writeTimeout": { "kind": "parameter", "displayName": "Write Timeout", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Write timeout for OkHttpClient" },
diff --git a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulClientConfiguration.java b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulClientConfiguration.java
index a57b07875b1..6367a8f9df5 100644
--- a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulClientConfiguration.java
+++ b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulClientConfiguration.java
@@ -61,10 +61,6 @@ public abstract class ConsulClientConfiguration implements Cloneable {
@UriParam
private Duration connectTimeout;
- @Deprecated
- @Metadata(deprecationNote = "Use readTimeout instead")
- @UriParam
- private Long readTimeoutMillis;
@UriParam
private Duration readTimeout;
@Deprecated
@@ -237,19 +233,6 @@ public abstract class ConsulClientConfiguration implements Cloneable {
this.connectTimeout = connectTimeout;
}
- public Long getReadTimeoutMillis() {
- return readTimeoutMillis;
- }
-
- /**
- * Read timeout for OkHttpClient
- *
- * @deprecated Use readTimeout instead.
- */
- public void setReadTimeoutMillis(Long readTimeoutMillis) {
- this.readTimeoutMillis = readTimeoutMillis;
- }
-
public Duration getReadTimeout() {
return readTimeout;
}
@@ -359,9 +342,8 @@ public abstract class ConsulClientConfiguration implements Cloneable {
if (ObjectHelper.isNotEmpty(readTimeout)) {
builder.withConnectTimeoutMillis(readTimeout.toMillis());
- } else if (ObjectHelper.isNotEmpty(readTimeoutMillis)) {
- builder.withReadTimeoutMillis(readTimeoutMillis);
}
+
if (ObjectHelper.isNotEmpty(writeTimeout)) {
builder.withConnectTimeoutMillis(writeTimeout.toMillis());
} else if (ObjectHelper.isNotEmpty(writeTimeoutMillis)) {
diff --git a/components/camel-consul/src/main/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryFactory.java b/components/camel-consul/src/main/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryFactory.java
index 20b626e5822..eb646039509 100644
--- a/components/camel-consul/src/main/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryFactory.java
+++ b/components/camel-consul/src/main/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryFactory.java
@@ -99,12 +99,12 @@ public class ConsulServiceDiscoveryFactory implements ServiceDiscoveryFactory {
configuration.setConnectTimeout(connectTimeout);
}
- public Long getReadTimeoutMillis() {
- return configuration.getReadTimeoutMillis();
+ public Duration getReadTimeout() {
+ return configuration.getReadTimeout();
}
- public void setReadTimeoutMillis(Long readTimeoutMillis) {
- configuration.setReadTimeoutMillis(readTimeoutMillis);
+ public void setReadTimeout(Duration readTimeout) {
+ configuration.setReadTimeout(readTimeout);
}
public Long getWriteTimeoutMillis() {
diff --git a/components/camel-consul/src/main/java/org/apache/camel/component/consul/cloud/ConsulServiceRegistry.java b/components/camel-consul/src/main/java/org/apache/camel/component/consul/cloud/ConsulServiceRegistry.java
index 11c005e0f27..e0b46428b20 100644
--- a/components/camel-consul/src/main/java/org/apache/camel/component/consul/cloud/ConsulServiceRegistry.java
+++ b/components/camel-consul/src/main/java/org/apache/camel/component/consul/cloud/ConsulServiceRegistry.java
@@ -124,12 +124,12 @@ public class ConsulServiceRegistry extends AbstractServiceRegistry {
configuration.setConnectTimeout(connectTimeout);
}
- public Long getReadTimeoutMillis() {
- return configuration.getReadTimeoutMillis();
+ public Duration getReadTimeout() {
+ return configuration.getReadTimeout();
}
- public void setReadTimeoutMillis(Long readTimeoutMillis) {
- configuration.setReadTimeoutMillis(readTimeoutMillis);
+ public void setReadTimeout(Duration readTimeout) {
+ configuration.setReadTimeout(readTimeout);
}
public Long getWriteTimeoutMillis() {
diff --git a/components/camel-consul/src/main/java/org/apache/camel/component/consul/cluster/ConsulClusterService.java b/components/camel-consul/src/main/java/org/apache/camel/component/consul/cluster/ConsulClusterService.java
index 9689d58459e..bc552d2fe68 100644
--- a/components/camel-consul/src/main/java/org/apache/camel/component/consul/cluster/ConsulClusterService.java
+++ b/components/camel-consul/src/main/java/org/apache/camel/component/consul/cluster/ConsulClusterService.java
@@ -105,12 +105,12 @@ public final class ConsulClusterService extends AbstractCamelClusterService<Cons
configuration.setConnectTimeout(connectTimeout);
}
- public Long getReadTimeoutMillis() {
- return configuration.getReadTimeoutMillis();
+ public Duration getReadTimeout() {
+ return configuration.getReadTimeout();
}
- public void setReadTimeoutMillis(Long readTimeoutMillis) {
- configuration.setReadTimeoutMillis(readTimeoutMillis);
+ public void setReadTimeout(Duration readTimeout) {
+ configuration.setReadTimeout(readTimeout);
}
public Long getWriteTimeoutMillis() {
diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_19.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_19.adoc
index 7f725549299..35331a80634 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_19.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_19.adoc
@@ -55,5 +55,8 @@ The deprecated options were removed and should be replaced by the following opti
|`connectTimeoutMillis`
|`connectTimeout`
+
+|`readTimeoutMillis`
+|`readTimeout`
|===
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ConsulComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ConsulComponentBuilderFactory.java
index 4f164e377fc..546d1de6a9c 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ConsulComponentBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ConsulComponentBuilderFactory.java
@@ -126,23 +126,6 @@ public interface ConsulComponentBuilderFactory {
doSetProperty("readTimeout", readTimeout);
return this;
}
- /**
- * Read timeout for OkHttpClient. Deprecation note: Use readTimeout
- * instead.
- *
- * The option is a: <code>java.lang.Long</code> type.
- *
- * Group: common
- *
- * @param readTimeoutMillis the value to set
- * @return the dsl builder
- */
- @Deprecated
- default ConsulComponentBuilder readTimeoutMillis(
- java.lang.Long readTimeoutMillis) {
- doSetProperty("readTimeoutMillis", readTimeoutMillis);
- return this;
- }
/**
* Set tags. You can separate multiple tags by comma.
*
@@ -529,7 +512,6 @@ public interface ConsulComponentBuilderFactory {
case "key": getOrCreateConfiguration((ConsulComponent) component).setKey((java.lang.String) value); return true;
case "pingInstance": getOrCreateConfiguration((ConsulComponent) component).setPingInstance((boolean) value); return true;
case "readTimeout": getOrCreateConfiguration((ConsulComponent) component).setReadTimeout((java.time.Duration) value); return true;
- case "readTimeoutMillis": getOrCreateConfiguration((ConsulComponent) component).setReadTimeoutMillis((java.lang.Long) value); return true;
case "tags": getOrCreateConfiguration((ConsulComponent) component).setTags((java.lang.String) value); return true;
case "url": getOrCreateConfiguration((ConsulComponent) component).setUrl((java.lang.String) value); return true;
case "writeTimeout": getOrCreateConfiguration((ConsulComponent) component).setWriteTimeout((java.time.Duration) value); return true;
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ConsulEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ConsulEndpointBuilderFactory.java
index 30c69a046d8..24b1c1e60b9 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ConsulEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ConsulEndpointBuilderFactory.java
@@ -182,41 +182,6 @@ public interface ConsulEndpointBuilderFactory {
doSetProperty("readTimeout", readTimeout);
return this;
}
- /**
- * Read timeout for OkHttpClient. Deprecation note: Use readTimeout
- * instead.
- *
- * The option is a: <code>java.lang.Long</code> type.
- *
- * Group: common
- *
- * @param readTimeoutMillis the value to set
- * @return the dsl builder
- */
- @Deprecated
- default ConsulEndpointConsumerBuilder readTimeoutMillis(
- Long readTimeoutMillis) {
- doSetProperty("readTimeoutMillis", readTimeoutMillis);
- return this;
- }
- /**
- * Read timeout for OkHttpClient. Deprecation note: Use readTimeout
- * instead.
- *
- * The option will be converted to a
- * <code>java.lang.Long</code> type.
- *
- * Group: common
- *
- * @param readTimeoutMillis the value to set
- * @return the dsl builder
- */
- @Deprecated
- default ConsulEndpointConsumerBuilder readTimeoutMillis(
- String readTimeoutMillis) {
- doSetProperty("readTimeoutMillis", readTimeoutMillis);
- return this;
- }
/**
* Set tags. You can separate multiple tags by comma.
*
@@ -854,41 +819,6 @@ public interface ConsulEndpointBuilderFactory {
doSetProperty("readTimeout", readTimeout);
return this;
}
- /**
- * Read timeout for OkHttpClient. Deprecation note: Use readTimeout
- * instead.
- *
- * The option is a: <code>java.lang.Long</code> type.
- *
- * Group: common
- *
- * @param readTimeoutMillis the value to set
- * @return the dsl builder
- */
- @Deprecated
- default ConsulEndpointProducerBuilder readTimeoutMillis(
- Long readTimeoutMillis) {
- doSetProperty("readTimeoutMillis", readTimeoutMillis);
- return this;
- }
- /**
- * Read timeout for OkHttpClient. Deprecation note: Use readTimeout
- * instead.
- *
- * The option will be converted to a
- * <code>java.lang.Long</code> type.
- *
- * Group: common
- *
- * @param readTimeoutMillis the value to set
- * @return the dsl builder
- */
- @Deprecated
- default ConsulEndpointProducerBuilder readTimeoutMillis(
- String readTimeoutMillis) {
- doSetProperty("readTimeoutMillis", readTimeoutMillis);
- return this;
- }
/**
* Set tags. You can separate multiple tags by comma.
*
@@ -1413,39 +1343,6 @@ public interface ConsulEndpointBuilderFactory {
doSetProperty("readTimeout", readTimeout);
return this;
}
- /**
- * Read timeout for OkHttpClient. Deprecation note: Use readTimeout
- * instead.
- *
- * The option is a: <code>java.lang.Long</code> type.
- *
- * Group: common
- *
- * @param readTimeoutMillis the value to set
- * @return the dsl builder
- */
- @Deprecated
- default ConsulEndpointBuilder readTimeoutMillis(Long readTimeoutMillis) {
- doSetProperty("readTimeoutMillis", readTimeoutMillis);
- return this;
- }
- /**
- * Read timeout for OkHttpClient. Deprecation note: Use readTimeout
- * instead.
- *
- * The option will be converted to a
- * <code>java.lang.Long</code> type.
- *
- * Group: common
- *
- * @param readTimeoutMillis the value to set
- * @return the dsl builder
- */
- @Deprecated
- default ConsulEndpointBuilder readTimeoutMillis(String readTimeoutMillis) {
- doSetProperty("readTimeoutMillis", readTimeoutMillis);
- return this;
- }
/**
* Set tags. You can separate multiple tags by comma.
*