Package org.alfresco.repo.config
Class ConfigDataCache
java.lang.Object
org.alfresco.util.cache.AbstractAsynchronouslyRefreshedCache<T>
org.alfresco.repo.cache.AbstractMTAsynchronouslyRefreshedCache<ConfigDataCache.ConfigData>
org.alfresco.repo.config.ConfigDataCache
- All Implemented Interfaces:
Callable<Void>,AsynchronouslyRefreshedCache<ConfigDataCache.ConfigData>,RefreshableCache<ConfigDataCache.ConfigData>,org.alfresco.util.cache.AsynchronouslyRefreshedCache<ConfigDataCache.ConfigData>,org.alfresco.util.cache.RefreshableCache<ConfigDataCache.ConfigData>,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 ConfigDataCache
extends AbstractMTAsynchronouslyRefreshedCache<ConfigDataCache.ConfigData>
An innder class that uses the
config service to asynchronously
refresh tenant config data.
Cluster-wide invalidation messages mean that we have to be very careful about only making
updates to caches when entries really change. However, the nature of the ConfigService
hierarchy makes it very difficult to do this in a deterministic manner without performing
write locks that run across tenants. By receiving asynchronous messages to refresh we no
longer have to rely on a cluster-aware cache.- Since:
- 4.1.5
- Author:
- Derek Hulley, Andy Hind
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classData containing all a tenant's required UI configurationstatic classImmutable version ofConfigDataCache.ConfigDatato ensure cast-iron safety of data being put into the caches. -
Field Summary
Fields inherited from class org.alfresco.util.cache.AbstractAsynchronouslyRefreshedCache
live, liveLock -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ConfigDataCache.ConfigDatabuildCache(String tenantId) Build the cache entry for the specific tenant.voidsetRepoXMLConfigService(RepoXMLConfigService repoXMLConfigService) Set the config service.Methods inherited from class org.alfresco.repo.cache.AbstractMTAsynchronouslyRefreshedCache
afterPropertiesSet, forceInChangesForThisUncommittedTransaction, get, isUpToDate, refresh, setTenantServiceMethods 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, waitForBuildMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.alfresco.repo.cache.AsynchronouslyRefreshedCache
getCacheId
-
Constructor Details
-
ConfigDataCache
public ConfigDataCache()
-
-
Method Details
-
setRepoXMLConfigService
Set the config service. Depending on the order of injection, this might have to be done by code. -
buildCache
Description copied from class:AbstractMTAsynchronouslyRefreshedCacheBuild the cache entry for the specific tenant. This method is called in a thread-safe manner i.e. it is only ever called by a single thread.- Specified by:
buildCachein classAbstractMTAsynchronouslyRefreshedCache<ConfigDataCache.ConfigData>
-