Class ResilienceConfiguration.CacheConfiguration.CacheConfigurationBuilder

java.lang.Object
com.sap.cloud.sdk.cloudplatform.resilience.ResilienceConfiguration.CacheConfiguration.CacheConfigurationBuilder
Enclosing class:
ResilienceConfiguration.CacheConfiguration

public static final class ResilienceConfiguration.CacheConfiguration.CacheConfigurationBuilder extends Object
Builder class for cache configuration. It enforces a decision on additional cache parameters.
  • Method Details

    • withExpirationStrategy

      @Nonnull public ResilienceConfiguration.CacheConfiguration.CacheConfigurationBuilder withExpirationStrategy(@Nonnull CacheExpirationStrategy expirationStrategy)
      Setter to set the Expiration Strategy for the cache configuration
      Parameters:
      expirationStrategy - defines the expiration strategy for the cache configuration
      Returns:
      The cache configuration builder instance
    • withParameters

      @Nonnull public ResilienceConfiguration.CacheConfiguration withParameters(@Nonnull Serializable component, @Nonnull Serializable... otherComponents)
      Instantiate the cache configuration with additional serializable parameters for the cache key.
      Parameters:
      component - A component to parameterize the cache configuration.
      otherComponents - Optionally further components to parameterize the cache.
      Returns:
      The immutable cache configuration instance
    • withParameters

      @Nonnull public ResilienceConfiguration.CacheConfiguration withParameters(@Nonnull Object component, @Nonnull Object... otherComponents)
      Instantiate the cache configuration with additional non-serializable parameters for the cache key.
      Parameters:
      component - A component to parameterize the cache configuration.
      otherComponents - Optionally further components to parameterize the cache.
      Returns:
      The immutable cache configuration instance
    • withoutParameters

      @Nonnull public ResilienceConfiguration.CacheConfiguration withoutParameters()
      Instantiate the cache configuration without additional parameters for the cache key.
      Returns:
      The immutable cache configuration instance