Class FHIRPersistenceJDBCTenantCache
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.jdbc.cache.FHIRPersistenceJDBCTenantCache
-
public class FHIRPersistenceJDBCTenantCache extends java.lang.Object
Manages separate caches for each tenant.
-
-
Constructor Summary
Constructors Constructor Description FHIRPersistenceJDBCTenantCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FHIRPersistenceJDBCCache
createCache(java.lang.String cacheKey)
Create the individual caches we need and wrap them in a container we use to hold them in the tenant mapFHIRPersistenceJDBCCache
getCacheForTenantAndDatasource()
Get the FHIRPersistenceJDBCCache cache associated with the tenant and datasource defined in the current request context.protected java.lang.String
getCacheKeyForTenantDatasource()
Derive a key representing the current request tenant and datasource
-
-
-
Method Detail
-
getCacheForTenantAndDatasource
public FHIRPersistenceJDBCCache getCacheForTenantAndDatasource()
Get the FHIRPersistenceJDBCCache cache associated with the tenant and datasource defined in the current request context.- Returns:
- the cache instance for the tenant/datasource
- Throws:
java.lang.IllegalStateException
- if the configuration failed to load
-
createCache
protected FHIRPersistenceJDBCCache createCache(java.lang.String cacheKey)
Create the individual caches we need and wrap them in a container we use to hold them in the tenant map- Parameters:
sharedExternalSystemNameCacheSize
-sharedExternalReferenceValuesCacheSize
-- Returns:
-
getCacheKeyForTenantDatasource
protected java.lang.String getCacheKeyForTenantDatasource()
Derive a key representing the current request tenant and datasource- Returns:
-
-