Class 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 Detail

      • CacheUpdater

        public CacheUpdater​(String tenantDatastoreCacheName,
                            Map<String,​Integer> newCacheCandidates)
    • 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 interface Synchronization
      • 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.
      • setCacheCandidates

        public void setCacheCandidates​(Map<String,​Integer> cacheCandidates)
      • getTenantDatastoreCacheName

        public String getTenantDatastoreCacheName()
      • setTenantDatastoreCacheName

        public void setTenantDatastoreCacheName​(String tenantDatastoreCacheName)