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
-
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.RemovalListener
to be invoked when entries are evicted.
-
Constructor Details
-
SimpleWindowPartitionCacheBuilder
public SimpleWindowPartitionCacheBuilder()
-
-
Method Details
-
maximumSize
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
Description copied from interface:WindowPartitionCache.Builder
Build the cache.- Specified by:
build
in interfaceWindowPartitionCache.Builder<K,
V> - Parameters:
loader
- theWindowPartitionCache.CacheLoader
- Returns:
- the
WindowPartitionCache
-