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 java.lang.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 boolean
equals(java.lang.Object obj)
java.time.Duration
getDuration()
The duration of entries after they are written to the cachejava.lang.Integer
getMaximumSize()
The maximum size of the cache before entries are evictedint
hashCode()
static CacheManager.Configuration
of(int maximumSize)
A factory method for creating the configuration of a cache with a time-based eviction policystatic 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 policiesstatic CacheManager.Configuration
of(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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in 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
-
-