You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "slawekjaranowski (via GitHub)" <gi...@apache.org> on 2023/03/28 07:55:33 UTC
[GitHub] [maven-resolver] slawekjaranowski commented on a diff in pull request #274: [MRESOLVER-347] Ability to control conn reuse
slawekjaranowski commented on code in PR #274:
URL: https://github.com/apache/maven-resolver/pull/274#discussion_r1150179920
##########
maven-resolver-api/src/main/java/org/eclipse/aether/ConfigurationProperties.java:
##########
@@ -159,6 +159,37 @@ public final class ConfigurationProperties {
*/
public static final boolean DEFAULT_HTTP_PREEMPTIVE_AUTH = false;
+ /**
+ * Should HTTP client reuse connections (in other words, pool connections) or not?
+ *
+ * @see #DEFAULT_HTTP_REUSE_CONNECTIONS
+ * @since 1.9.8
+ */
+ public static final String HTTP_REUSE_CONNECTIONS = PREFIX_CONNECTOR + "http.reuseConnections";
+
+ /**
+ * The default value to use if {@link #HTTP_REUSE_CONNECTIONS} isn't set (true).
+ *
+ * @since 1.9.8
+ */
+ public static final boolean DEFAULT_HTTP_REUSE_CONNECTIONS = true;
+
+ /**
+ * The maximum TTL (in milliseconds) HTTP client should apply to connections when reused.
+ *
+ * @see #DEFAULT_HTTP_CONNECTION_MAX_TTL
+ * @see <a href="https://hc.apache.org/httpcomponents-client-4.5.x/current/httpclient/apidocs/org/apache/http/conn/ConnectionKeepAliveStrategy.html">ConnectionKeepAliveStrategy</a>
+ * @since 1.9.8
+ */
+ public static final String HTTP_CONNECTION_MAX_TTL = PREFIX_CONNECTOR + "http.connectionMaxTtl";
+
+ /**
+ * The default value to use if {@link #HTTP_CONNECTION_MAX_TTL} isn't set (-1 or "no suggested duration"/forever).
+ *
+ * @since 1.9.8
+ */
+ public static final long DEFAULT_HTTP_CONNECTION_MAX_TTL = -1;
Review Comment:
It will be good to have it as is in Wagon - 300
user will have the same without additional settings
https://github.com/apache/maven-wagon/blob/master/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java#L305
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org