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 forWindowPartitionCache
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WindowPartitionCache<K,V>
build(WindowPartitionCache.CacheLoader<K,V> loader)
Build the cache.WindowPartitionCache.Builder<K,V>
maximumSize(long size)
The maximum cache size.WindowPartitionCache.Builder<K,V>
removalListener(WindowPartitionCache.RemovalListener<K,V> listener)
TheWindowPartitionCache.RemovalListener
to be invoked when entries are evicted.
-
-
-
Method Detail
-
maximumSize
WindowPartitionCache.Builder<K,V> maximumSize(long size)
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
WindowPartitionCache<K,V> build(WindowPartitionCache.CacheLoader<K,V> loader)
Build the cache.- Parameters:
loader
- theWindowPartitionCache.CacheLoader
- Returns:
- the
WindowPartitionCache
-
-