Package org.apache.flink.runtime.util
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 ofGroupCache. Entries will be expired after timeout.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultGroupCache.Factory<G,K,V>The Factory ofDefaultGroupCache.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()clear all cache.voidclearCacheForGroup(G group)Clear all caches of the corresponding group.Vget(G group, K key)Get value in cache.voidput(G group, K key, V value)Put group, key and value to cache.
-
-
-
Method Detail
-
clear
public void clear()
Description copied from interface:GroupCacheclear all cache.- Specified by:
clearin interfaceGroupCache<G,K,V>
-
get
public V get(G group, K key)
Description copied from interface:GroupCacheGet value in cache.- Specified by:
getin interfaceGroupCache<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:GroupCachePut group, key and value to cache.- Specified by:
putin interfaceGroupCache<G,K,V>
-
clearCacheForGroup
public void clearCacheForGroup(G group)
Description copied from interface:GroupCacheClear all caches of the corresponding group.- Specified by:
clearCacheForGroupin interfaceGroupCache<G,K,V>
-
-