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.RemovalListener
to be invoked when entries are evicted.
-
-
-
Method Detail
-
maximumSize
public SimpleWindowPartitionCache.SimpleWindowPartitionCacheBuilder<K,V> maximumSize(long size)
Description copied from interface:WindowPartitionCache.Builder
The maximum cache size. After this limit, entries are evicted from the cache.- Specified by:
maximumSize
in 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.Builder
TheWindowPartitionCache.RemovalListener
to be invoked when entries are evicted.- Specified by:
removalListener
in 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.Builder
Build the cache.- Specified by:
build
in interfaceWindowPartitionCache.Builder<K,V>
- Parameters:
loader
- theWindowPartitionCache.CacheLoader
- Returns:
- the
WindowPartitionCache
-
-