Package org.linuxforhealth.fhir.core
Class TenantSpecificFileBasedCache<T>
- java.lang.Object
 - 
- org.linuxforhealth.fhir.core.TenantSpecificFileBasedCache<T>
 
 
- 
- Direct Known Subclasses:
 TenantSpecificPropertyGroupCache,TenantSpecificSearchParameterCache
public abstract class TenantSpecificFileBasedCache<T> extends java.lang.ObjectThis 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 voidclearCache()Clears the entire cache.abstract TcreateCachedObject(java.io.File file)TgetCachedObjectForTenant(java.lang.String tenantId)abstract java.lang.StringgetCacheEntryFilename(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
 
 - 
 
 -