Class DefaultGroupCache<G,K,V>

java.lang.Object
org.apache.flink.runtime.util.DefaultGroupCache<G,K,V>
All Implemented Interfaces:
GroupCache<G,K,V>

@NotThreadSafe public class DefaultGroupCache<G,K,V> extends Object implements GroupCache<G,K,V>
Default implement of GroupCache. Entries will be expired after timeout.
  • Method Details

    • clear

      public void clear()
      Description copied from interface: GroupCache
      clear all cache.
      Specified by:
      clear in interface GroupCache<G,K,V>
    • get

      public V get(G group, K key)
      Description copied from interface: GroupCache
      Get value in cache.
      Specified by:
      get in interface GroupCache<G,K,V>
      Returns:
      value in cache if exists, otherwise null
    • put

      public void put(G group, K key, V value)
      Description copied from interface: GroupCache
      Put group, key and value to cache.
      Specified by:
      put in interface GroupCache<G,K,V>
    • clearCacheForGroup

      public void clearCacheForGroup(G group)
      Description copied from interface: GroupCache
      Clear all caches of the corresponding group.
      Specified by:
      clearCacheForGroup in interface GroupCache<G,K,V>