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 -
Method Summary
Modifier and TypeMethodDescriptionbuild(WindowPartitionCache.CacheLoader<K, V> loader) Build the cache.maximumSize(long size) The maximum cache size.removalListener(WindowPartitionCache.RemovalListener<K, V> listener) TheWindowPartitionCache.RemovalListenerto be invoked when entries are evicted.
-
Constructor Details
-
SimpleWindowPartitionCacheBuilder
public SimpleWindowPartitionCacheBuilder()
-
-
Method Details
-
maximumSize
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
Description copied from interface:WindowPartitionCache.BuilderBuild the cache.- Specified by:
buildin interfaceWindowPartitionCache.Builder<K,V> - Parameters:
loader- theWindowPartitionCache.CacheLoader- Returns:
- the
WindowPartitionCache
-