Interface WindowPartitionCache.Builder<K,V>
- Type Parameters:
K
- the key typeV
- the value type
- All Known Implementing Classes:
SimpleWindowPartitionCache.SimpleWindowPartitionCacheBuilder
- Enclosing interface:
- WindowPartitionCache<K,
V>
public static interface WindowPartitionCache.Builder<K,V>
Builder interface for
WindowPartitionCache
.-
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.
-
Method Details
-
maximumSize
The maximum cache size. After this limit, entries are evicted from the cache.- Parameters:
size
- the size- Returns:
- the Builder
-
removalListener
WindowPartitionCache.Builder<K,V> removalListener(WindowPartitionCache.RemovalListener<K, V> listener) TheWindowPartitionCache.RemovalListener
to be invoked when entries are evicted.- Parameters:
listener
- the listener- Returns:
- the builder
-
build
Build the cache.- Parameters:
loader
- theWindowPartitionCache.CacheLoader
- Returns:
- the
WindowPartitionCache
-