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 class
DefaultGroupCache.Factory<G,K,V>
The Factory ofDefaultGroupCache
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
clear all cache.void
clearCacheForGroup(G group)
Clear all caches of the corresponding group.V
get(G group, K key)
Get value in cache.void
put(G group, K key, V value)
Put group, key and value to cache.
-
-
-
Method Detail
-
clear
public void clear()
Description copied from interface:GroupCache
clear all cache.- Specified by:
clear
in interfaceGroupCache<G,K,V>
-
get
public V get(G group, K key)
Description copied from interface:GroupCache
Get value in cache.- Specified by:
get
in 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:GroupCache
Put group, key and value to cache.- Specified by:
put
in interfaceGroupCache<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 interfaceGroupCache<G,K,V>
-
-