Package org.linuxforhealth.fhir.cache
Class CacheManager.Configuration
- java.lang.Object
-
- org.linuxforhealth.fhir.cache.CacheManager.Configuration
-
- Enclosing class:
- CacheManager
public static class CacheManager.Configuration extends java.lang.ObjectA 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(java.lang.Object obj)java.time.DurationgetDuration()The duration of entries after they are written to the cachejava.lang.IntegergetMaximumSize()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, java.time.Duration duration)A factory method for creating the configuration of a cache with both size and time-based eviction policiesstatic CacheManager.Configurationof(java.time.Duration duration)A factory method for creating the configuration of a cache with a time-based eviction policy
-
-
-
Method Detail
-
getMaximumSize
public java.lang.Integer getMaximumSize()
The maximum size of the cache before entries are evicted- Returns:
- the maximum size or null
-
getDuration
public java.time.Duration getDuration()
The duration of entries after they are written to the cache- Returns:
- the duration or null
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
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, java.time.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(java.time.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
-
-