Class CacheUpdater
- java.lang.Object
-
- com.ibm.fhir.persistence.jdbc.util.CacheUpdater
-
- All Implemented Interfaces:
Synchronization
public abstract class CacheUpdater extends Object implements Synchronization
This is an abstract base class encapsulating functionality related to adding entries to a JDBC PL in-memory cache.
-
-
Constructor Summary
Constructors Constructor Description CacheUpdater(String tenantDatastoreCacheName, Map<String,Integer> newCacheCandidates)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
afterCompletion(int completionStatus)
Writes candidate cache entries to the appropriate cache after being notified by the Trx Synchronization service that the transaction on the current thread has successfully committed.void
beforeCompletion()
void
clearCacheCandidates()
Empties the collection of cache candidates.abstract void
commitCacheCandidates()
Implemented by subclasses to perform the mechanics of writing cache candidate entries to the appropriate cache.Map<String,Integer>
getCacheCandidates()
String
getTenantDatastoreCacheName()
void
setCacheCandidates(Map<String,Integer> cacheCandidates)
void
setTenantDatastoreCacheName(String tenantDatastoreCacheName)
-
-
-
Method Detail
-
afterCompletion
public void afterCompletion(int completionStatus)
Writes candidate cache entries to the appropriate cache after being notified by the Trx Synchronization service that the transaction on the current thread has successfully committed.- Specified by:
afterCompletion
in interfaceSynchronization
-
beforeCompletion
public void beforeCompletion()
- Specified by:
beforeCompletion
in interfaceSynchronization
-
commitCacheCandidates
public abstract void commitCacheCandidates()
Implemented by subclasses to perform the mechanics of writing cache candidate entries to the appropriate cache.
-
clearCacheCandidates
public void clearCacheCandidates()
Empties the collection of cache candidates.
-
getTenantDatastoreCacheName
public String getTenantDatastoreCacheName()
-
setTenantDatastoreCacheName
public void setTenantDatastoreCacheName(String tenantDatastoreCacheName)
-
-