Class ApacheHttpClient5CacheBuilder

java.lang.Object
com.sap.cloud.sdk.cloudplatform.connectivity.ApacheHttpClient5CacheBuilder

public class ApacheHttpClient5CacheBuilder extends Object
Builder class for a default implementation of the ApacheHttpClient5Cache interface.
Since:
4.20.0
  • Constructor Details

    • ApacheHttpClient5CacheBuilder

      public ApacheHttpClient5CacheBuilder()
  • Method Details

    • durationInMilliseconds

      @Nonnull @Beta public ApacheHttpClient5CacheBuilder durationInMilliseconds(int durationInMilliseconds)
      Sets the duration for which HttpClient instances will be cached.

      This is an optional parameter. By default, the cache duration is set to 5 minutes.

      Parameters:
      durationInMilliseconds - The duration in milliseconds.
      Returns:
      This builder.
    • duration

      @Nonnull public ApacheHttpClient5CacheBuilder duration(@Nonnull Duration duration)
      Sets the duration for which HttpClient instances will be cached.

      This is an optional parameter. By default, the cache duration is set to 5 minutes.

      Parameters:
      duration - The duration.
      Returns:
      This builder.
    • build

      @Nonnull public ApacheHttpClient5Cache build()
      Builds a new ApacheHttpClient5Cache instance with the previously configured parameters.
      Returns:
      The new ApacheHttpClient5Cache instance.