Class ResilienceConfiguration.CacheConfiguration
java.lang.Object
com.sap.cloud.sdk.cloudplatform.resilience.ResilienceConfiguration.CacheConfiguration
- Enclosing class:
- ResilienceConfiguration
Provides options specific to caching.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builder class for cache configuration. -
Field Summary
Modifier and TypeFieldDescriptionstatic final CacheExpirationStrategy
Default value of Expiration Strategy is set as the strategy which is based on the last modification of the cache. -
Method Summary
Modifier and TypeMethodDescriptiondisabled()
Factory method to create a disabled cache configuration.boolean
Duration after which the cache entry will be invalidated.Expiration strategy for the cache.int
hashCode()
boolean
Get the status indicator for the Cache.Factory method to create a cache configuration builder instance.Additional parameters added to the cache key.boolean
Flag to indicate parameters being serializable.
-
Field Details
-
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
Factory method to create a disabled cache configuration.- Returns:
- A disabled cache configuration instance.
-
equals
-
hashCode
public int hashCode() -
serializable
public boolean serializable()Flag to indicate parameters being serializable. -
expirationDuration
Duration after which the cache entry will be invalidated. -
expirationStrategy
Expiration strategy for the cache. -
parameters
Additional parameters added to the cache key.
-