Class TranslationCacheManager
java.lang.Object
com.e1c.langtool.internal.external.cache.TranslationCacheManager
- All Implemented Interfaces:
ITranslationCacheManager
- Direct Known Subclasses:
SharedTranslationCache
The base realization of
ITranslationCacheManager.
This cache manager provides initialization of caches for each cacheable
(see isCacheable())
provider that given from
ITranslationProviderRegistry.
Also this manager provides lazy initialization of each provider's
cache using a lazy proxy objects instead of real cache objects. If IOError
occurs while cache initializing then it logs an error and uses CacheStub as cache.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.e1c.langtool.external.cache.ITranslationCacheManager
ITranslationCacheManager.ITranslationCache -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCacheByProviderId(String providerId) Returns the cache of translations for the given provider's id or null if this manager contains no cache for the given id.protected Map<String,ITranslationCacheManager.ITranslationCache> voidsetCache(String providerId, ITranslationCacheManager.ITranslationCache cache) Sets the cache of translations for specified provider.
-
Constructor Details
-
TranslationCacheManager
public TranslationCacheManager()
-
-
Method Details
-
getCacheByProviderId
Description copied from interface:ITranslationCacheManagerReturns the cache of translations for the given provider's id or null if this manager contains no cache for the given id.- Specified by:
getCacheByProviderIdin interfaceITranslationCacheManager- Parameters:
providerId- the provider's id whose associated cache is to be returned- Returns:
- the cache of translations for specified provider
-
setCache
Description copied from interface:ITranslationCacheManagerSets the cache of translations for specified provider.- Specified by:
setCachein interfaceITranslationCacheManager- Parameters:
providerId- the provider's id whose associated cache is to be setcache- the cache of translations
-
getCaches
-