Class TxUpdateFilterCache

All Implemented Interfaces:

public class TxUpdateFilterCache extends TxDecoratorCache
Decorator class that updates the internal cache using a certain update policy when the update(LocaleData.TranslationMap) method is called.
See Also:
  • Constructor Details

    • TxUpdateFilterCache

      public TxUpdateFilterCache(int policy, @NonNull TxCache internalCache)
      Creates a new instance having the provided TxCacheUpdatePolicy and internal cache.
      policy - One of the available update policies.
      internalCache - The internal cache to be used.
  • Method Details

    • update

      public void update(@NonNull LocaleData.TranslationMap translationMap)
      Updates the internal cache with the provided translations using the update policy specified in the constructor.

      Note that after calculating the new translations with the current update policy, the internal cache's TxCache.update(LocaleData.TranslationMap) method is called to set them. Depending on the cache's implementation, the actual result may be different to the calculated one.

      Specified by:
      update in interface TxCache
      update in class TxDecoratorCache