public static class SimpleWindowPartitionCache.SimpleWindowPartitionCacheBuilder<K,V> extends Object implements WindowPartitionCache.Builder<K,V>
Constructor and Description |
---|
SimpleWindowPartitionCacheBuilder() |
Modifier and Type | Method and 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)
The
WindowPartitionCache.RemovalListener to be invoked when entries are evicted. |
public SimpleWindowPartitionCache.SimpleWindowPartitionCacheBuilder<K,V> maximumSize(long size)
WindowPartitionCache.Builder
The maximum cache size. After this limit, entries are evicted from the cache.
maximumSize
in interface WindowPartitionCache.Builder<K,V>
size
- the sizepublic SimpleWindowPartitionCache.SimpleWindowPartitionCacheBuilder<K,V> removalListener(WindowPartitionCache.RemovalListener<K,V> listener)
WindowPartitionCache.Builder
The WindowPartitionCache.RemovalListener
to be invoked when entries are evicted.
removalListener
in interface WindowPartitionCache.Builder<K,V>
listener
- the listenerpublic SimpleWindowPartitionCache<K,V> build(WindowPartitionCache.CacheLoader<K,V> loader)
WindowPartitionCache.Builder
Build the cache.
build
in interface WindowPartitionCache.Builder<K,V>
loader
- the WindowPartitionCache.CacheLoader
WindowPartitionCache
Copyright © 2020 The Apache Software Foundation. All rights reserved.