diff options
Diffstat (limited to 'vespa-feed-client-api')
-rw-r--r-- | vespa-feed-client-api/abi-spec.json | 1 | ||||
-rw-r--r-- | vespa-feed-client-api/src/main/java/ai/vespa/feed/client/FeedClientBuilder.java | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/vespa-feed-client-api/abi-spec.json b/vespa-feed-client-api/abi-spec.json index e8c2b4a3c9e..907d974ff09 100644 --- a/vespa-feed-client-api/abi-spec.json +++ b/vespa-feed-client-api/abi-spec.json @@ -144,6 +144,7 @@ "public static void setFeedClientBuilderSupplier(java.util.function.Supplier)", "public abstract ai.vespa.feed.client.FeedClientBuilder setConnectionsPerEndpoint(int)", "public abstract ai.vespa.feed.client.FeedClientBuilder setMaxStreamPerConnection(int)", + "public abstract ai.vespa.feed.client.FeedClientBuilder setConnectionTimeToLive(java.time.Duration)", "public abstract ai.vespa.feed.client.FeedClientBuilder setSslContext(javax.net.ssl.SSLContext)", "public abstract ai.vespa.feed.client.FeedClientBuilder setHostnameVerifier(javax.net.ssl.HostnameVerifier)", "public abstract ai.vespa.feed.client.FeedClientBuilder setProxyHostnameVerifier(javax.net.ssl.HostnameVerifier)", diff --git a/vespa-feed-client-api/src/main/java/ai/vespa/feed/client/FeedClientBuilder.java b/vespa-feed-client-api/src/main/java/ai/vespa/feed/client/FeedClientBuilder.java index 270ecad6af8..7101b8452ed 100644 --- a/vespa-feed-client-api/src/main/java/ai/vespa/feed/client/FeedClientBuilder.java +++ b/vespa-feed-client-api/src/main/java/ai/vespa/feed/client/FeedClientBuilder.java @@ -7,6 +7,7 @@ import java.net.URI; import java.nio.file.Path; import java.security.PrivateKey; import java.security.cert.X509Certificate; +import java.time.Duration; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -63,6 +64,9 @@ public interface FeedClientBuilder { */ FeedClientBuilder setMaxStreamPerConnection(int max); + /** Sets a duration after which this client will recycle active connections. This is off ({@code Duration.ZERO}) by default. */ + FeedClientBuilder setConnectionTimeToLive(Duration ttl); + /** Sets {@link SSLContext} instance. */ FeedClientBuilder setSslContext(SSLContext context); |