Class SimpleWindowPartitionCache<K,V> 
java.lang.Object
org.apache.storm.windowing.persistence.SimpleWindowPartitionCache<K,V> 
- All Implemented Interfaces:
- WindowPartitionCache<K,- V> 
A simple implementation that evicts the largest un-pinned entry from the cache. This works well for caching window partitions since the
 access pattern is mostly sequential scans.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classNested classes/interfaces inherited from interface org.apache.storm.windowing.persistence.WindowPartitionCacheWindowPartitionCache.Builder<K,V>, WindowPartitionCache.CacheLoader<K, V>, WindowPartitionCache.RemovalCause, WindowPartitionCache.RemovalListener<K, V> 
- 
Method SummaryModifier and TypeMethodDescriptionasMap()Return aConcurrentMapview of the current entries in the cache.Get value from the cache or load the value.voidinvalidate(K key) Invalidate an entry from the cache.static <K,V> SimpleWindowPartitionCache.SimpleWindowPartitionCacheBuilder<K, V> Get value from the cache or load the value pinning it so that the entry will never get evicted.booleanUnpin an entry from the cache so that it can be a candidate for eviction.
- 
Method Details- 
newBuilder
- 
getDescription copied from interface:WindowPartitionCacheGet value from the cache or load the value.- Specified by:
- getin interface- WindowPartitionCache<K,- V> 
- Parameters:
- key- the key
- Returns:
- the value
 
- 
pinAndGetDescription copied from interface:WindowPartitionCacheGet value from the cache or load the value pinning it so that the entry will never get evicted.- Specified by:
- pinAndGetin interface- WindowPartitionCache<K,- V> 
- Parameters:
- key- the key
- Returns:
- the value
 
- 
unpinDescription copied from interface:WindowPartitionCacheUnpin an entry from the cache so that it can be a candidate for eviction.- Specified by:
- unpinin interface- WindowPartitionCache<K,- V> 
- Parameters:
- key- the key
- Returns:
- true if the entry was unpinned, false otherwise
 
- 
asMapDescription copied from interface:WindowPartitionCacheReturn aConcurrentMapview of the current entries in the cache.- Specified by:
- asMapin interface- WindowPartitionCache<K,- V> 
- Returns:
- the map of key-values currently cached.
 
- 
invalidateDescription copied from interface:WindowPartitionCacheInvalidate an entry from the cache.- Specified by:
- invalidatein interface- WindowPartitionCache<K,- V> 
- Parameters:
- key- the key
 
 
-