Package com.ibm.fhir.cache
Class CacheManager.Configuration
- java.lang.Object
-
- com.ibm.fhir.cache.CacheManager.Configuration
-
- Enclosing class:
- CacheManager
public static class CacheManager.Configuration extends Object
A configuration class used by the cache manager to create managed cache instances with size and/or time-based eviction policies
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)DurationgetDuration()The duration of entries after they are written to the cacheIntegergetMaximumSize()The maximum size of the cache before entries are evictedinthashCode()static CacheManager.Configurationof(int maximumSize)A factory method for creating the configuration of a cache with a time-based eviction policystatic CacheManager.Configurationof(int maximumSize, Duration duration)A factory method for creating the configuration of a cache with both size and time-based eviction policiesstatic CacheManager.Configurationof(Duration duration)A factory method for creating the configuration of a cache with a time-based eviction policy
-
-
-
Method Detail
-
getMaximumSize
public Integer getMaximumSize()
The maximum size of the cache before entries are evicted- Returns:
- the maximum size or null
-
getDuration
public Duration getDuration()
The duration of entries after they are written to the cache- Returns:
- the duration or null
-
of
public static CacheManager.Configuration of(int maximumSize)
A factory method for creating the configuration of a cache with a time-based eviction policy- Parameters:
maximumSize- the maximum size- Returns:
- a configuration instance
-
of
public static CacheManager.Configuration of(int maximumSize, Duration duration)
A factory method for creating the configuration of a cache with both size and time-based eviction policies- Parameters:
maximumSize- the maximum sizeduration- the duration- Returns:
- a configuration instance
-
of
public static CacheManager.Configuration of(Duration duration)
A factory method for creating the configuration of a cache with a time-based eviction policy- Parameters:
duration- the duration- Returns:
- a configuration instance
-
-