Class SimpleWindowPartitionCache.SimpleWindowPartitionCacheBuilder<K,V>
- java.lang.Object
-
- org.apache.storm.windowing.persistence.SimpleWindowPartitionCache.SimpleWindowPartitionCacheBuilder<K,V>
-
- All Implemented Interfaces:
WindowPartitionCache.Builder<K,V>
- Enclosing class:
- SimpleWindowPartitionCache<K,V>
public static class SimpleWindowPartitionCache.SimpleWindowPartitionCacheBuilder<K,V> extends Object implements WindowPartitionCache.Builder<K,V>
-
-
Constructor Summary
Constructors Constructor Description SimpleWindowPartitionCacheBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleWindowPartitionCache<K,V>build(WindowPartitionCache.CacheLoader<K,V> loader)Build the cache.SimpleWindowPartitionCache.SimpleWindowPartitionCacheBuilder<K,V>maximumSize(long size)The maximum cache size.SimpleWindowPartitionCache.SimpleWindowPartitionCacheBuilder<K,V>removalListener(WindowPartitionCache.RemovalListener<K,V> listener)TheWindowPartitionCache.RemovalListenerto be invoked when entries are evicted.
-
-
-
Method Detail
-
maximumSize
public SimpleWindowPartitionCache.SimpleWindowPartitionCacheBuilder<K,V> maximumSize(long size)
Description copied from interface:WindowPartitionCache.BuilderThe maximum cache size. After this limit, entries are evicted from the cache.- Specified by:
maximumSizein interfaceWindowPartitionCache.Builder<K,V>- Parameters:
size- the size- Returns:
- the Builder
-
removalListener
public SimpleWindowPartitionCache.SimpleWindowPartitionCacheBuilder<K,V> removalListener(WindowPartitionCache.RemovalListener<K,V> listener)
Description copied from interface:WindowPartitionCache.BuilderTheWindowPartitionCache.RemovalListenerto be invoked when entries are evicted.- Specified by:
removalListenerin interfaceWindowPartitionCache.Builder<K,V>- Parameters:
listener- the listener- Returns:
- the builder
-
build
public SimpleWindowPartitionCache<K,V> build(WindowPartitionCache.CacheLoader<K,V> loader)
Description copied from interface:WindowPartitionCache.BuilderBuild the cache.- Specified by:
buildin interfaceWindowPartitionCache.Builder<K,V>- Parameters:
loader- theWindowPartitionCache.CacheLoader- Returns:
- the
WindowPartitionCache
-
-