Interface CacheConfiguration
public interface CacheConfiguration
Interface used for the configuration of caches.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the duration of the expire after write property of the cache.intReturns the number of elements the cache can hold.default booleanCaching is disabled when this returnstrue.default booleanReturnstrueif cache statistics recording has been enabled.
-
Method Details
-
getCacheDuration
Duration getCacheDuration()Returns the duration of the expire after write property of the cache. Cached elements are automatically invalidated after this fixed duration has elapsed.- Returns:
- duration of expire after write.
-
getCacheSize
int getCacheSize()Returns the number of elements the cache can hold.- Returns:
- the size of the cache.
-
isCacheDisabled
default boolean isCacheDisabled()Caching is disabled when this returnstrue.- Returns:
trueif cache is disabled
-
isCacheStatisticsEnabled
default boolean isCacheStatisticsEnabled()Returnstrueif cache statistics recording has been enabled. If it is enabled, cache statistics might be obtained from theCacheable.- Returns:
trueif cache statistics is enabled
-