Interface AbstractUserAgentAnalyzer.ClientHintsCacheInstantiator<T extends Serializable>

All Superinterfaces:
Serializable
All Known Implementing Classes:
DefaultClientHintsCacheInstantiator, Java11ClientHintsCacheInstantiator, Java8ClientHintsCacheInstantiator
Enclosing class:
AbstractUserAgentAnalyzer

public static interface AbstractUserAgentAnalyzer.ClientHintsCacheInstantiator<T extends Serializable> extends Serializable
  • Method Summary

    Modifier and Type
    Method
    Description
    instantiateCache(int cacheSize)
    A single method that must create a new instance of the cache.
  • Method Details

    • instantiateCache

      Map<String,T> instantiateCache(int cacheSize)
      A single method that must create a new instance of the cache. The returned instance MUST implement at least the Map.get(java.lang.Object) and Map.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.