Package io.apicurio.registry.serde.utils
Class BoundedCacheFactory
java.lang.Object
io.apicurio.registry.serde.utils.BoundedCacheFactory
Factory for creating bounded LRU (Least Recently Used) caches.
These caches are thread-safe and automatically evict the least recently accessed entry
when the cache exceeds the specified maximum size.
-
Method Summary
-
Method Details
-
createLRU
Creates a thread-safe bounded LRU cache. When the cache exceeds maxSize, the least recently accessed entry is removed.- Type Parameters:
K- the type of keys maintained by this cacheV- the type of mapped values- Parameters:
maxSize- the maximum number of entries the cache should hold- Returns:
- a new thread-safe bounded LRU cache
-