Class SerializationCheckedCache<K,V>

java.lang.Object
com.atlassian.jira.cache.serialcheck.SerializationCheckedCache<K,V>
All Implemented Interfaces:
com.atlassian.cache.Cache<K,V>, com.atlassian.cache.ReadThroughCache<K,V>

@ParametersAreNonnullByDefault public class SerializationCheckedCache<K,V> extends Object implements com.atlassian.cache.Cache<K,V>
Decorator that makes a serialization-checked version of a cache.
Since:
v7.2.0
  • Constructor Details

    • SerializationCheckedCache

      public SerializationCheckedCache(SerializationChecker checker, com.atlassian.cache.Cache<K,V> delegate)
  • Method Details

    • getName

      @Nonnull public String getName()
      Specified by:
      getName in interface com.atlassian.cache.ReadThroughCache<K,V>
    • containsKey

      public boolean containsKey(K key)
      Specified by:
      containsKey in interface com.atlassian.cache.ReadThroughCache<K,V>
    • getKeys

      @Nonnull public Collection<K> getKeys()
      Specified by:
      getKeys in interface com.atlassian.cache.ReadThroughCache<K,V>
    • get

      @Nullable public V get(K key)
      Specified by:
      get in interface com.atlassian.cache.ReadThroughCache<K,V>
    • get

      @Nonnull public V get(K key, com.atlassian.cache.Supplier<? extends V> supplier)
      Specified by:
      get in interface com.atlassian.cache.ReadThroughCache<K,V>
    • put

      public void put(K key, V value)
      Specified by:
      put in interface com.atlassian.cache.Cache<K,V>
    • putIfAbsent

      @Nullable public V putIfAbsent(K key, V value)
      Specified by:
      putIfAbsent in interface com.atlassian.cache.Cache<K,V>
    • remove

      public void remove(K key)
      Specified by:
      remove in interface com.atlassian.cache.ReadThroughCache<K,V>
    • remove

      public boolean remove(K key, V value)
      Specified by:
      remove in interface com.atlassian.cache.ReadThroughCache<K,V>
    • removeAll

      public void removeAll()
      Specified by:
      removeAll in interface com.atlassian.cache.ReadThroughCache<K,V>
    • replace

      public boolean replace(K key, V oldValue, V newValue)
      Specified by:
      replace in interface com.atlassian.cache.Cache<K,V>
    • addListener

      public void addListener(com.atlassian.cache.CacheEntryListener<K,V> listener, boolean includeValues)
      Specified by:
      addListener in interface com.atlassian.cache.Cache<K,V>
    • removeListener

      public void removeListener(com.atlassian.cache.CacheEntryListener<K,V> cacheEntryListener)
      Specified by:
      removeListener in interface com.atlassian.cache.Cache<K,V>