Class ResilienceConfiguration.CacheConfiguration

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

public static final class ResilienceConfiguration.CacheConfiguration extends Object
Provides options specific to caching.
  • Field Details

    • DEFAULT_EXPIRATION_STRATEGY

      public static final CacheExpirationStrategy DEFAULT_EXPIRATION_STRATEGY
      Default value of Expiration Strategy is set as the strategy which is based on the last modification of the cache.
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Get the status indicator for the Cache.
      Returns:
      True if the configuration is enabled.
    • of

      @Nonnull public static ResilienceConfiguration.CacheConfiguration.CacheConfigurationBuilder of(@Nonnull Duration expirationDuration)
      Factory method to create a cache configuration builder instance.
      Parameters:
      expirationDuration - The duration after which the cache entry will be invalidated automatically.
      Returns:
      A new cache configuration builder instance.
    • disabled

      @Nonnull public static ResilienceConfiguration.CacheConfiguration disabled()
      Factory method to create a disabled cache configuration.
      Returns:
      A disabled cache configuration instance.
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • serializable

      public boolean serializable()
      Flag to indicate parameters being serializable.
    • expirationDuration

      @Nonnull public Duration expirationDuration()
      Duration after which the cache entry will be invalidated.
    • expirationStrategy

      @Nonnull public CacheExpirationStrategy expirationStrategy()
      Expiration strategy for the cache.
    • parameters

      @Nonnull public Iterable<Object> parameters()
      Additional parameters added to the cache key.