Class RegistryAsynchronouslyRefreshedCache

  • All Implemented Interfaces:
    java.util.concurrent.Callable<java.lang.Void>, org.alfresco.repo.cache.AsynchronouslyRefreshedCache<org.springframework.extensions.webscripts.Registry>, org.alfresco.repo.cache.RefreshableCache<org.springframework.extensions.webscripts.Registry>, org.alfresco.util.cache.AsynchronouslyRefreshedCache<org.springframework.extensions.webscripts.Registry>, org.alfresco.util.cache.RefreshableCache<org.springframework.extensions.webscripts.Registry>, org.alfresco.util.cache.RefreshableCacheListener, org.alfresco.util.transaction.TransactionListener, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean

    public class RegistryAsynchronouslyRefreshedCache
    extends org.alfresco.repo.cache.AbstractMTAsynchronouslyRefreshedCache<org.springframework.extensions.webscripts.Registry>
    implements org.springframework.beans.factory.InitializingBean
    Asynchronously refreshed cache for repository webscripts.

    This does not stop gratuitous calls to refresh but will ensure that, once an instance has been created, a version of the registry is returned even if it is slighly out of date. This can be changed so that it waits for reset but is probably not required.

    Since:
    4.2.0
    Author:
    Derek Hulley
    • Field Summary

      • Fields inherited from class org.alfresco.util.cache.AbstractAsynchronouslyRefreshedCache

        live, liveLock
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      protected org.springframework.extensions.webscripts.Registry buildCache​(java.lang.String tenantId)  
      void setRegistryFactory​(org.springframework.beans.factory.ObjectFactory<org.springframework.extensions.webscripts.Registry> registryFactory)  
      void setRetryingTransactionHelper​(org.alfresco.repo.transaction.RetryingTransactionHelper retryingTransactionHelper)  
      • Methods inherited from class org.alfresco.repo.cache.AbstractMTAsynchronouslyRefreshedCache

        forceInChangesForThisUncommittedTransaction, get, isUpToDate, refresh, setTenantService
      • Methods inherited from class org.alfresco.util.cache.AbstractAsynchronouslyRefreshedCache

        afterCommit, afterRollback, beforeCommit, beforeCompletion, broadcastEvent, call, forceInChangesForThisUncommittedTransaction, get, getCacheId, init, isUpToDate, onRefreshableCacheEvent, refresh, register, setBeanName, setRegistry, setThreadPoolExecutor, toString, waitForBuild
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.alfresco.repo.cache.AsynchronouslyRefreshedCache

        getCacheId
    • Constructor Detail

      • RegistryAsynchronouslyRefreshedCache

        public RegistryAsynchronouslyRefreshedCache()
    • Method Detail

      • setRegistryFactory

        public void setRegistryFactory​(org.springframework.beans.factory.ObjectFactory<org.springframework.extensions.webscripts.Registry> registryFactory)
        Parameters:
        registryFactory - factory for web script registries
      • setRetryingTransactionHelper

        public void setRetryingTransactionHelper​(org.alfresco.repo.transaction.RetryingTransactionHelper retryingTransactionHelper)
        Parameters:
        retryingTransactionHelper - the retryingTransactionHelper to set
      • buildCache

        protected org.springframework.extensions.webscripts.Registry buildCache​(java.lang.String tenantId)
        Specified by:
        buildCache in class org.alfresco.repo.cache.AbstractMTAsynchronouslyRefreshedCache<org.springframework.extensions.webscripts.Registry>
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Overrides:
        afterPropertiesSet in class org.alfresco.repo.cache.AbstractMTAsynchronouslyRefreshedCache<org.springframework.extensions.webscripts.Registry>
        Throws:
        java.lang.Exception