Class FHIRPersistenceJDBCCacheImpl
- java.lang.Object
-
- com.ibm.fhir.persistence.jdbc.cache.FHIRPersistenceJDBCCacheImpl
-
- All Implemented Interfaces:
FHIRPersistenceJDBCCache
public class FHIRPersistenceJDBCCacheImpl extends Object implements FHIRPersistenceJDBCCache
Aggregates and manages the individual caches used for a tenant
-
-
Constructor Summary
Constructors Constructor Description FHIRPersistenceJDBCCacheImpl(INameIdCache<Integer> resourceTypeCache, INameIdCache<Integer> parameterNameCache, ICommonTokenValuesCache resourceReferenceCache)Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description INameIdCache<Integer>getParameterNameCache()Getter for the cache of parameter namesICommonTokenValuesCachegetResourceReferenceCache()Getter for the common token values cacheINameIdCache<Integer>getResourceTypeCache()Getter for the cache of resource types used to look up resource type idbooleanneedToPrefill()Returns true if the caller should attempt to prefill the caches.voidtransactionCommitted()Tell any caches that the transaction on the current thread has just committedvoidtransactionRolledBack()The transaction on the current thread was rolled back, so throw away anything held in thread-local caches
-
-
-
Constructor Detail
-
FHIRPersistenceJDBCCacheImpl
public FHIRPersistenceJDBCCacheImpl(INameIdCache<Integer> resourceTypeCache, INameIdCache<Integer> parameterNameCache, ICommonTokenValuesCache resourceReferenceCache)
Public constructor- Parameters:
resourceTypeCache-parameterNameCache-resourceReferenceCache-
-
-
Method Detail
-
getResourceReferenceCache
public ICommonTokenValuesCache getResourceReferenceCache()
Description copied from interface:FHIRPersistenceJDBCCacheGetter for the common token values cache- Specified by:
getResourceReferenceCachein interfaceFHIRPersistenceJDBCCache- Returns:
- the resourceReferenceCache
-
getResourceTypeCache
public INameIdCache<Integer> getResourceTypeCache()
Description copied from interface:FHIRPersistenceJDBCCacheGetter for the cache of resource types used to look up resource type id- Specified by:
getResourceTypeCachein interfaceFHIRPersistenceJDBCCache- Returns:
-
getParameterNameCache
public INameIdCache<Integer> getParameterNameCache()
Description copied from interface:FHIRPersistenceJDBCCacheGetter for the cache of parameter names- Specified by:
getParameterNameCachein interfaceFHIRPersistenceJDBCCache- Returns:
- the parameterNameCache
-
transactionCommitted
public void transactionCommitted()
Description copied from interface:FHIRPersistenceJDBCCacheTell any caches that the transaction on the current thread has just committed- Specified by:
transactionCommittedin interfaceFHIRPersistenceJDBCCache
-
transactionRolledBack
public void transactionRolledBack()
Description copied from interface:FHIRPersistenceJDBCCacheThe transaction on the current thread was rolled back, so throw away anything held in thread-local caches- Specified by:
transactionRolledBackin interfaceFHIRPersistenceJDBCCache
-
needToPrefill
public boolean needToPrefill()
Description copied from interface:FHIRPersistenceJDBCCacheReturns true if the caller should attempt to prefill the caches. Prefilling must only be done before any new records are inserted to ensure the shared caches contain only data which has been previously committed to the database.- Specified by:
needToPrefillin interfaceFHIRPersistenceJDBCCache- Returns:
-
-