Package com.ibm.fhir.core
Class TenantSpecificFileBasedCache<T>
- java.lang.Object
-
- com.ibm.fhir.core.TenantSpecificFileBasedCache<T>
-
- Direct Known Subclasses:
TenantSpecificPropertyGroupCache
,TenantSpecificSearchParameterCache
public abstract class TenantSpecificFileBasedCache<T> extends java.lang.Object
This class is a parameterized abstract base class to be used for situations where we need to implement a tenant-specific cache of file-based objects. Examples include: configuration parameters, structure definitions, search parameters, etc.
-
-
Constructor Summary
Constructors Constructor Description TenantSpecificFileBasedCache()
TenantSpecificFileBasedCache(java.lang.String cacheType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
clearCache()
Clears the entire cache.abstract T
createCachedObject(java.io.File file)
T
getCachedObjectForTenant(java.lang.String tenantId)
abstract java.lang.String
getCacheEntryFilename(java.lang.String tenantId)
-
-
-
Method Detail
-
clearCache
public void clearCache()
Clears the entire cache. This might be useful during testing when you need to clear out the entire cache and re-load.
-
getCacheEntryFilename
public abstract java.lang.String getCacheEntryFilename(java.lang.String tenantId)
-
createCachedObject
public abstract T createCachedObject(java.io.File file) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getCachedObjectForTenant
public T getCachedObjectForTenant(java.lang.String tenantId) throws java.lang.Exception
- Parameters:
tenantId
-- Returns:
- the cached object for the tenant or null if it could not be found
- Throws:
java.lang.Exception
-
-