Package nl.basjes.parse.useragent
Interface AbstractUserAgentAnalyzer.ClientHintsCacheInstantiator<T extends Serializable>
- All Superinterfaces:
Serializable
- Enclosing class:
- AbstractUserAgentAnalyzer
public static interface AbstractUserAgentAnalyzer.ClientHintsCacheInstantiator<T extends Serializable>
extends Serializable
-
Method Summary
Modifier and TypeMethodDescriptioninstantiateCache
(int cacheSize) A single method that must create a new instance of the cache.
-
Method Details
-
instantiateCache
A single method that must create a new instance of the cache. The returned instance MUST implement at least theMap.get(java.lang.Object)
andMap.put(K, V)
methods in a threadsafe way if you intend to use this in a multithreaded scenario. Yauaa only uses the put and get methods and in exceptional cases the clear method. An implementation that does some kind of automatic cleaning of obsolete values is recommended (like LRU).- Parameters:
cacheSize
- is the size of the new cache (which will be >= 1)- Returns:
- Instance of the new cache.
-